{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>.container { width:100% !important; }</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            _id  symbol      date     open     high      low  \\\n",
      "57023  5eb95e094222208b27184ba4  TF2009  20200511  103.345  103.400  102.765   \n",
      "57024  5eb95e094222208b27184ba5  TF2012  20200511  102.770  102.770  102.190   \n",
      "57025  5eb95e094222208b27184ba6  TS2006  20200511  102.430  102.520  102.265   \n",
      "57026  5eb95e094222208b27184ba7  TS2009  20200511  102.015  102.135  101.860   \n",
      "57027  5eb95e094222208b27184ba8  TS2012  20200511  101.835  101.925  101.680   \n",
      "\n",
      "         close  volume  open_interest    turnover   settle  pre_settle  \\\n",
      "57023  102.880   15059        16911.0  1552264.42  102.950     103.395   \n",
      "57024  102.295     199          590.0    20394.72  102.340     102.680   \n",
      "57025  102.315    6968         9631.0  1427169.62  102.325     102.400   \n",
      "57026  101.895    4308         6716.0   879062.80  101.925     102.030   \n",
      "57027  101.710     270         1796.0    54974.45  101.725     101.835   \n",
      "\n",
      "      variety           cv  \n",
      "57023      TF  1739803.680  \n",
      "57024      TF    60354.050  \n",
      "57025      TS   985395.765  \n",
      "57026      TS   684326.820  \n",
      "57027      TS   182671.160  \n",
      "       date variety  会员简称  long_openIntr  short_openIntr     净持仓  \\\n",
      "0  20200302       A  永安期货        10626.0          4625.0  6001.0   \n",
      "1  20200302      AG  永安期货        10893.0         11920.0 -1027.0   \n",
      "2  20200302      AL  永安期货        12603.0         17946.0 -5343.0   \n",
      "3  20200302      AP  永安期货         3449.0          7569.0 -4120.0   \n",
      "4  20200302      AU  永安期货         8294.0             0.0  8294.0   \n",
      "\n",
      "   contractValue  \n",
      "0   41393.196904  \n",
      "1   61519.307241  \n",
      "2   66526.309284  \n",
      "3   69779.989784  \n",
      "4  361952.994644  \n",
      "计算完毕\n"
     ]
    }
   ],
   "source": [
    "%matplotlib notebook\n",
    "import pymongo\n",
    "import pandas as pd\n",
    "import matplotlib as plt\n",
    "import json\n",
    "from pandas import Series,DataFrame\n",
    "pd.set_option('display.width', None)  # 设置字符显示宽度\n",
    "pd.set_option('display.max_rows', None)  # 设置显示最大行\n",
    "pd.set_option('display.max_columns', None)  # 设置显示最大行\n",
    "#二行即可搞定画图中文乱码\n",
    "plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus']=False #用来正常显示负号\n",
    "from IPython.core.display import display, HTML\n",
    "display(HTML(\"<style>.container { width:100% !important; }</style>\"))\n",
    "\n",
    "#连接数据库\n",
    "client = pymongo.MongoClient('localhost',27017)\n",
    "futures = client.futures2\n",
    "\n",
    "market = futures.market\n",
    "unit = futures.unit\n",
    "position = futures.position\n",
    "\n",
    "date = \"20200301\"\n",
    "#查询会员\n",
    "# BrokerID='海通期货'\n",
    "BrokerID='永安期货'\n",
    "#加载数据\n",
    "market = DataFrame(list(market.find({'date': {'$gte': date}})))\n",
    "unit = DataFrame(list(unit.find()))\n",
    "position = DataFrame(list(position.find({'date': {'$gte': date}}))).dropna().drop_duplicates(['date','variety','symbol','long_party_name'], 'last')\n",
    "# print(market.tail())\n",
    "# #选择需要显示的字段\n",
    "market = market.copy()\n",
    "# 指数收盘\n",
    "market['cv'] = market.apply(lambda x: x['close'] * x['open_interest'], axis=1).fillna(0)\n",
    "print(market.tail())\n",
    "closes = market.groupby(['date', 'variety'])[['cv', 'open_interest']].sum()\n",
    "#待解决问题：根据最小价位变动，给收盘价做五舍四入处理\n",
    "closes['close_index'] = closes['cv'] / closes['open_interest']\n",
    "market = closes.reset_index()[['date','variety','close_index']].fillna(0)\n",
    "\n",
    "unit=unit[[ 'variety','unit']]\n",
    "\n",
    "# #汇总合约\n",
    "data3=position[(position['long_party_name'] == BrokerID)]\n",
    "data3=data3[['date','variety','long_party_name','long_openIntr']]\n",
    "data3=data3.groupby(['date','variety','long_party_name'])[['long_openIntr']].sum()\n",
    "\n",
    "data4=position[(position['short_party_name'] == BrokerID)]\n",
    "data4=data4[['date','variety','short_party_name','short_openIntr']]\n",
    "data4=data4.groupby(['date','variety','short_party_name'])[['short_openIntr']].sum()\n",
    "\n",
    "\n",
    "# #并集\n",
    "data5=pd.merge(data3,data4, on=['date','variety'],how='outer')\n",
    "data5['会员简称']=data5.apply(lambda x: BrokerID,axis=1)\n",
    "data5.tail(100)\n",
    "#nan缺失值填充fillna()为0\n",
    "data5=data5.fillna(0)\n",
    "data5['净持仓']=data5.apply(lambda x: x['long_openIntr']-x['short_openIntr'],axis=1)\n",
    "\n",
    "# df['当日涨幅']=df.apply(lambda x: x['收盘']-x['收盘'].shift(1)-1,axis=1)\n",
    "#选择需要显示的字段\n",
    "data5=data5[['会员简称','long_openIntr','short_openIntr','净持仓']]\n",
    "data5=data5.reset_index(['variety','date'])\n",
    "netpostion=data5.set_index('date')\n",
    "\n",
    "\n",
    "netpostion=data5.pivot_table('净持仓',index='date',columns='variety',fill_value=0)\n",
    "# print(netpostion)\n",
    "#合约价值\n",
    "contractValue=pd.merge(market,unit,how='left',sort=False).drop_duplicates()\n",
    "contractValue['contractValue'] = contractValue.apply(lambda x: x['close_index']*x['unit'],axis=1)\n",
    "contractValue=contractValue[['date','variety','contractValue']]\n",
    "\n",
    "# #值替换replace()\n",
    "# # contractValue=contractValue.replace(['TA'],'PTA')\n",
    "sz=pd.merge(data5,contractValue,on=['date','variety'],how='left')\n",
    "print(sz.head())\n",
    "# #净持仓价值\n",
    "sz['净持仓价值']=sz.apply(lambda x: int(x['净持仓']*x['contractValue']/10000 if x['contractValue']>0 else 0),axis=1)\n",
    "\n",
    "sznet=sz[['date','variety','会员简称','净持仓价值']]\n",
    "sz=sznet.sort_values(by='净持仓价值')\n",
    "sz=sz.pivot_table('净持仓价值',index=['date','会员简称'],columns='variety',fill_value=0)\n",
    "sz=sz.copy()\n",
    "sz['化工板块']=sz[['RU','MA','V','L','PP','BU','TA']].sum(axis=1)\n",
    "sz['油脂板块']=sz[['Y','P','OI']].sum(axis=1)\n",
    "sz['有色板块']=sz[['CU','AL','ZN','NI','PB']].sum(axis=1)\n",
    "sz['黑色板块']=sz[['RB','HC','ZC','J','JM','I']].sum(axis=1)\n",
    "sz['黄金白银']=sz[['AU','AG']].sum(axis=1)\n",
    "sz['工业品']=sz[['CU','AL','ZN','NI','PB','RB','FG','RU','L','V','TA','MA','PP','JM','J','ZC','I','BU','HC','SM','SF','FU']].sum(axis=1)\n",
    "sz['农产品']=sz[['A','C','M','RM','Y','P','OI','CF','SR','JD','CS','AP']].sum(axis=1)\n",
    "sz['商品板块']=sz.sum(axis=1)\n",
    "\n",
    "\n",
    "# chemical=sz.copy()\n",
    "# chemical=chemical[['RU','MA','V','L','PP','BU','TA','商品板块','工业品','化工板块']]\n",
    "# chemical['max']=chemical[['RU','MA','V','L','PP','BU','TA']].idxmax(axis=1)\n",
    "# chemical['min']=chemical[['RU','MA','V','L','PP','BU']].idxmin(axis=1)\n",
    "# chemical['20200120':]\n",
    "# chemical = chemical.reset_index()\n",
    "\n",
    "# # futures = client.futures\n",
    "# # flows = futures.chemical\n",
    "# # flows.insert(json.loads(chemical.T.to_json()).values())\n",
    "print(\"计算完毕\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>RU</th>\n",
       "      <th>MA</th>\n",
       "      <th>V</th>\n",
       "      <th>L</th>\n",
       "      <th>PP</th>\n",
       "      <th>BU</th>\n",
       "      <th>TA</th>\n",
       "      <th>商品板块</th>\n",
       "      <th>工业品</th>\n",
       "      <th>化工板块</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-5664</td>\n",
       "      <td>-23852</td>\n",
       "      <td>147341</td>\n",
       "      <td>83288</td>\n",
       "      <td>14468</td>\n",
       "      <td>4534</td>\n",
       "      <td>-64551</td>\n",
       "      <td>2242503</td>\n",
       "      <td>386111</td>\n",
       "      <td>155564</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-12454</td>\n",
       "      <td>-8913</td>\n",
       "      <td>156503</td>\n",
       "      <td>81057</td>\n",
       "      <td>3620</td>\n",
       "      <td>24327</td>\n",
       "      <td>-69140</td>\n",
       "      <td>2321892</td>\n",
       "      <td>403162</td>\n",
       "      <td>175000</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9941</td>\n",
       "      <td>-13569</td>\n",
       "      <td>156090</td>\n",
       "      <td>83222</td>\n",
       "      <td>4338</td>\n",
       "      <td>26945</td>\n",
       "      <td>-74226</td>\n",
       "      <td>3081902</td>\n",
       "      <td>548168</td>\n",
       "      <td>172859</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-12323</td>\n",
       "      <td>-19466</td>\n",
       "      <td>158289</td>\n",
       "      <td>73947</td>\n",
       "      <td>1917</td>\n",
       "      <td>18540</td>\n",
       "      <td>-98706</td>\n",
       "      <td>3259601</td>\n",
       "      <td>558203</td>\n",
       "      <td>122198</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9380</td>\n",
       "      <td>-5938</td>\n",
       "      <td>163750</td>\n",
       "      <td>72220</td>\n",
       "      <td>-3226</td>\n",
       "      <td>27987</td>\n",
       "      <td>-117308</td>\n",
       "      <td>2988019</td>\n",
       "      <td>478137</td>\n",
       "      <td>128105</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-7427</td>\n",
       "      <td>-3983</td>\n",
       "      <td>161302</td>\n",
       "      <td>57249</td>\n",
       "      <td>-168</td>\n",
       "      <td>27879</td>\n",
       "      <td>-105342</td>\n",
       "      <td>2518960</td>\n",
       "      <td>445132</td>\n",
       "      <td>129510</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9482</td>\n",
       "      <td>-7591</td>\n",
       "      <td>157579</td>\n",
       "      <td>60658</td>\n",
       "      <td>9469</td>\n",
       "      <td>7191</td>\n",
       "      <td>-94056</td>\n",
       "      <td>2953085</td>\n",
       "      <td>664653</td>\n",
       "      <td>123768</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9898</td>\n",
       "      <td>-12366</td>\n",
       "      <td>151765</td>\n",
       "      <td>49498</td>\n",
       "      <td>19975</td>\n",
       "      <td>8670</td>\n",
       "      <td>-74300</td>\n",
       "      <td>3086349</td>\n",
       "      <td>723774</td>\n",
       "      <td>133344</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-20690</td>\n",
       "      <td>-6269</td>\n",
       "      <td>144084</td>\n",
       "      <td>44217</td>\n",
       "      <td>28614</td>\n",
       "      <td>3137</td>\n",
       "      <td>-107152</td>\n",
       "      <td>2449221</td>\n",
       "      <td>581648</td>\n",
       "      <td>85941</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-17079</td>\n",
       "      <td>-12918</td>\n",
       "      <td>143624</td>\n",
       "      <td>46464</td>\n",
       "      <td>20225</td>\n",
       "      <td>8218</td>\n",
       "      <td>-130228</td>\n",
       "      <td>2584952</td>\n",
       "      <td>489821</td>\n",
       "      <td>58306</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13978</td>\n",
       "      <td>-16476</td>\n",
       "      <td>151123</td>\n",
       "      <td>33964</td>\n",
       "      <td>-42109</td>\n",
       "      <td>22810</td>\n",
       "      <td>-117694</td>\n",
       "      <td>2870598</td>\n",
       "      <td>412635</td>\n",
       "      <td>17640</td>\n",
       "      <td>V</td>\n",
       "      <td>PP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-8588</td>\n",
       "      <td>-29107</td>\n",
       "      <td>145799</td>\n",
       "      <td>12140</td>\n",
       "      <td>-40040</td>\n",
       "      <td>36356</td>\n",
       "      <td>-146159</td>\n",
       "      <td>2267793</td>\n",
       "      <td>214572</td>\n",
       "      <td>-29599</td>\n",
       "      <td>V</td>\n",
       "      <td>PP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>11797</td>\n",
       "      <td>-17615</td>\n",
       "      <td>135754</td>\n",
       "      <td>23492</td>\n",
       "      <td>-48660</td>\n",
       "      <td>41301</td>\n",
       "      <td>-171976</td>\n",
       "      <td>2183291</td>\n",
       "      <td>137680</td>\n",
       "      <td>-25907</td>\n",
       "      <td>V</td>\n",
       "      <td>PP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2078</td>\n",
       "      <td>5074</td>\n",
       "      <td>152859</td>\n",
       "      <td>31274</td>\n",
       "      <td>1732</td>\n",
       "      <td>26938</td>\n",
       "      <td>-167181</td>\n",
       "      <td>2622175</td>\n",
       "      <td>262490</td>\n",
       "      <td>52774</td>\n",
       "      <td>V</td>\n",
       "      <td>PP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-3166</td>\n",
       "      <td>11566</td>\n",
       "      <td>147127</td>\n",
       "      <td>27044</td>\n",
       "      <td>3220</td>\n",
       "      <td>24390</td>\n",
       "      <td>-172173</td>\n",
       "      <td>2568459</td>\n",
       "      <td>206366</td>\n",
       "      <td>38008</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13183</td>\n",
       "      <td>3140</td>\n",
       "      <td>119876</td>\n",
       "      <td>38813</td>\n",
       "      <td>14832</td>\n",
       "      <td>80954</td>\n",
       "      <td>-169100</td>\n",
       "      <td>1996112</td>\n",
       "      <td>4251</td>\n",
       "      <td>75332</td>\n",
       "      <td>V</td>\n",
       "      <td>RU</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-8555</td>\n",
       "      <td>-27041</td>\n",
       "      <td>105171</td>\n",
       "      <td>36049</td>\n",
       "      <td>52967</td>\n",
       "      <td>56120</td>\n",
       "      <td>-229451</td>\n",
       "      <td>2740776</td>\n",
       "      <td>101255</td>\n",
       "      <td>-14740</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13398</td>\n",
       "      <td>-24110</td>\n",
       "      <td>128955</td>\n",
       "      <td>9363</td>\n",
       "      <td>56927</td>\n",
       "      <td>45126</td>\n",
       "      <td>-239647</td>\n",
       "      <td>2364524</td>\n",
       "      <td>-1563</td>\n",
       "      <td>-36784</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-11461</td>\n",
       "      <td>-19612</td>\n",
       "      <td>132666</td>\n",
       "      <td>-36983</td>\n",
       "      <td>43502</td>\n",
       "      <td>23322</td>\n",
       "      <td>-276149</td>\n",
       "      <td>1690348</td>\n",
       "      <td>-106656</td>\n",
       "      <td>-144715</td>\n",
       "      <td>V</td>\n",
       "      <td>L</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-10952</td>\n",
       "      <td>-49356</td>\n",
       "      <td>105290</td>\n",
       "      <td>-44524</td>\n",
       "      <td>13376</td>\n",
       "      <td>19804</td>\n",
       "      <td>-251519</td>\n",
       "      <td>1607639</td>\n",
       "      <td>-147108</td>\n",
       "      <td>-217881</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-14411</td>\n",
       "      <td>-44639</td>\n",
       "      <td>72875</td>\n",
       "      <td>-59097</td>\n",
       "      <td>43878</td>\n",
       "      <td>12681</td>\n",
       "      <td>-196311</td>\n",
       "      <td>1199832</td>\n",
       "      <td>-259374</td>\n",
       "      <td>-185024</td>\n",
       "      <td>V</td>\n",
       "      <td>L</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-16185</td>\n",
       "      <td>-58283</td>\n",
       "      <td>76143</td>\n",
       "      <td>-67403</td>\n",
       "      <td>46809</td>\n",
       "      <td>27549</td>\n",
       "      <td>-193771</td>\n",
       "      <td>932421</td>\n",
       "      <td>-299673</td>\n",
       "      <td>-185141</td>\n",
       "      <td>V</td>\n",
       "      <td>L</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-15220</td>\n",
       "      <td>-95946</td>\n",
       "      <td>81442</td>\n",
       "      <td>-35859</td>\n",
       "      <td>81430</td>\n",
       "      <td>17476</td>\n",
       "      <td>-189120</td>\n",
       "      <td>309687</td>\n",
       "      <td>-513903</td>\n",
       "      <td>-155797</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13332</td>\n",
       "      <td>-70115</td>\n",
       "      <td>101201</td>\n",
       "      <td>-30975</td>\n",
       "      <td>95716</td>\n",
       "      <td>2623</td>\n",
       "      <td>-107866</td>\n",
       "      <td>546431</td>\n",
       "      <td>-419471</td>\n",
       "      <td>-22748</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-15477</td>\n",
       "      <td>-80941</td>\n",
       "      <td>88234</td>\n",
       "      <td>-25277</td>\n",
       "      <td>94542</td>\n",
       "      <td>8107</td>\n",
       "      <td>-78327</td>\n",
       "      <td>822433</td>\n",
       "      <td>-325012</td>\n",
       "      <td>-9139</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-11368</td>\n",
       "      <td>-80411</td>\n",
       "      <td>92641</td>\n",
       "      <td>16918</td>\n",
       "      <td>137517</td>\n",
       "      <td>9926</td>\n",
       "      <td>-89360</td>\n",
       "      <td>1984305</td>\n",
       "      <td>-39788</td>\n",
       "      <td>75863</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-7830</td>\n",
       "      <td>-87429</td>\n",
       "      <td>90429</td>\n",
       "      <td>18065</td>\n",
       "      <td>97665</td>\n",
       "      <td>2786</td>\n",
       "      <td>-134955</td>\n",
       "      <td>2813734</td>\n",
       "      <td>285003</td>\n",
       "      <td>-21269</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-10651</td>\n",
       "      <td>-101084</td>\n",
       "      <td>91077</td>\n",
       "      <td>24021</td>\n",
       "      <td>113418</td>\n",
       "      <td>-3637</td>\n",
       "      <td>-25637</td>\n",
       "      <td>2670050</td>\n",
       "      <td>403395</td>\n",
       "      <td>87507</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-12084</td>\n",
       "      <td>-85538</td>\n",
       "      <td>115039</td>\n",
       "      <td>29880</td>\n",
       "      <td>227880</td>\n",
       "      <td>545</td>\n",
       "      <td>-18416</td>\n",
       "      <td>3503899</td>\n",
       "      <td>733011</td>\n",
       "      <td>257306</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-11709</td>\n",
       "      <td>-146306</td>\n",
       "      <td>80099</td>\n",
       "      <td>33583</td>\n",
       "      <td>210414</td>\n",
       "      <td>-5543</td>\n",
       "      <td>-63649</td>\n",
       "      <td>3151101</td>\n",
       "      <td>589161</td>\n",
       "      <td>96889</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-11954</td>\n",
       "      <td>-137605</td>\n",
       "      <td>76218</td>\n",
       "      <td>33771</td>\n",
       "      <td>114420</td>\n",
       "      <td>-24412</td>\n",
       "      <td>-43180</td>\n",
       "      <td>2710748</td>\n",
       "      <td>499413</td>\n",
       "      <td>7258</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-6678</td>\n",
       "      <td>-78236</td>\n",
       "      <td>74798</td>\n",
       "      <td>52842</td>\n",
       "      <td>-2598</td>\n",
       "      <td>35561</td>\n",
       "      <td>-48452</td>\n",
       "      <td>2376220</td>\n",
       "      <td>370684</td>\n",
       "      <td>27237</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-3873</td>\n",
       "      <td>-66570</td>\n",
       "      <td>73970</td>\n",
       "      <td>107561</td>\n",
       "      <td>33396</td>\n",
       "      <td>43152</td>\n",
       "      <td>-91085</td>\n",
       "      <td>2309153</td>\n",
       "      <td>448219</td>\n",
       "      <td>96551</td>\n",
       "      <td>L</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-3285</td>\n",
       "      <td>-98565</td>\n",
       "      <td>75660</td>\n",
       "      <td>102129</td>\n",
       "      <td>91921</td>\n",
       "      <td>-13793</td>\n",
       "      <td>-89438</td>\n",
       "      <td>1953567</td>\n",
       "      <td>296570</td>\n",
       "      <td>64629</td>\n",
       "      <td>L</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-372</td>\n",
       "      <td>-64954</td>\n",
       "      <td>67771</td>\n",
       "      <td>86121</td>\n",
       "      <td>109765</td>\n",
       "      <td>11492</td>\n",
       "      <td>-222708</td>\n",
       "      <td>1810302</td>\n",
       "      <td>193720</td>\n",
       "      <td>-12885</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-1091</td>\n",
       "      <td>-99214</td>\n",
       "      <td>64535</td>\n",
       "      <td>110164</td>\n",
       "      <td>130484</td>\n",
       "      <td>23817</td>\n",
       "      <td>-167999</td>\n",
       "      <td>1714688</td>\n",
       "      <td>215054</td>\n",
       "      <td>60696</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1701</td>\n",
       "      <td>-96324</td>\n",
       "      <td>82368</td>\n",
       "      <td>96075</td>\n",
       "      <td>172989</td>\n",
       "      <td>56414</td>\n",
       "      <td>-176409</td>\n",
       "      <td>1949009</td>\n",
       "      <td>246564</td>\n",
       "      <td>136814</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>11836</td>\n",
       "      <td>-62690</td>\n",
       "      <td>77020</td>\n",
       "      <td>111598</td>\n",
       "      <td>222253</td>\n",
       "      <td>81106</td>\n",
       "      <td>-157540</td>\n",
       "      <td>2261150</td>\n",
       "      <td>304352</td>\n",
       "      <td>283583</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>8917</td>\n",
       "      <td>-79097</td>\n",
       "      <td>79971</td>\n",
       "      <td>147191</td>\n",
       "      <td>200938</td>\n",
       "      <td>31838</td>\n",
       "      <td>-142008</td>\n",
       "      <td>2364006</td>\n",
       "      <td>371013</td>\n",
       "      <td>247750</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>8647</td>\n",
       "      <td>-98247</td>\n",
       "      <td>89565</td>\n",
       "      <td>157386</td>\n",
       "      <td>186147</td>\n",
       "      <td>38134</td>\n",
       "      <td>-129622</td>\n",
       "      <td>2309809</td>\n",
       "      <td>317666</td>\n",
       "      <td>252010</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>9131</td>\n",
       "      <td>-98690</td>\n",
       "      <td>90228</td>\n",
       "      <td>130179</td>\n",
       "      <td>169130</td>\n",
       "      <td>7360</td>\n",
       "      <td>-136044</td>\n",
       "      <td>1818277</td>\n",
       "      <td>154319</td>\n",
       "      <td>171294</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>11002</td>\n",
       "      <td>-83486</td>\n",
       "      <td>99056</td>\n",
       "      <td>82611</td>\n",
       "      <td>116044</td>\n",
       "      <td>3689</td>\n",
       "      <td>-131942</td>\n",
       "      <td>1918854</td>\n",
       "      <td>120192</td>\n",
       "      <td>96974</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>9542</td>\n",
       "      <td>-84645</td>\n",
       "      <td>108476</td>\n",
       "      <td>94165</td>\n",
       "      <td>138620</td>\n",
       "      <td>22250</td>\n",
       "      <td>-123258</td>\n",
       "      <td>2883589</td>\n",
       "      <td>456494</td>\n",
       "      <td>165150</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>12005</td>\n",
       "      <td>-89243</td>\n",
       "      <td>111749</td>\n",
       "      <td>133085</td>\n",
       "      <td>140462</td>\n",
       "      <td>15776</td>\n",
       "      <td>-139669</td>\n",
       "      <td>2926557</td>\n",
       "      <td>488702</td>\n",
       "      <td>184165</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9088</td>\n",
       "      <td>-101621</td>\n",
       "      <td>122216</td>\n",
       "      <td>116924</td>\n",
       "      <td>129597</td>\n",
       "      <td>11070</td>\n",
       "      <td>-136553</td>\n",
       "      <td>3528170</td>\n",
       "      <td>691206</td>\n",
       "      <td>132545</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-7621</td>\n",
       "      <td>-117570</td>\n",
       "      <td>115274</td>\n",
       "      <td>119495</td>\n",
       "      <td>128930</td>\n",
       "      <td>10967</td>\n",
       "      <td>-142095</td>\n",
       "      <td>3427475</td>\n",
       "      <td>612268</td>\n",
       "      <td>107380</td>\n",
       "      <td>PP</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>8395</td>\n",
       "      <td>-99223</td>\n",
       "      <td>117037</td>\n",
       "      <td>91872</td>\n",
       "      <td>83558</td>\n",
       "      <td>7524</td>\n",
       "      <td>-129599</td>\n",
       "      <td>3456647</td>\n",
       "      <td>607290</td>\n",
       "      <td>79564</td>\n",
       "      <td>V</td>\n",
       "      <td>MA</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety           RU      MA       V       L      PP     BU      TA     商品板块  \\\n",
       "date     会员简称                                                                  \n",
       "20200302 永安期货  -5664  -23852  147341   83288   14468   4534  -64551  2242503   \n",
       "20200303 永安期货 -12454   -8913  156503   81057    3620  24327  -69140  2321892   \n",
       "20200304 永安期货  -9941  -13569  156090   83222    4338  26945  -74226  3081902   \n",
       "20200305 永安期货 -12323  -19466  158289   73947    1917  18540  -98706  3259601   \n",
       "20200306 永安期货  -9380   -5938  163750   72220   -3226  27987 -117308  2988019   \n",
       "20200309 永安期货  -7427   -3983  161302   57249    -168  27879 -105342  2518960   \n",
       "20200310 永安期货  -9482   -7591  157579   60658    9469   7191  -94056  2953085   \n",
       "20200311 永安期货  -9898  -12366  151765   49498   19975   8670  -74300  3086349   \n",
       "20200312 永安期货 -20690   -6269  144084   44217   28614   3137 -107152  2449221   \n",
       "20200313 永安期货 -17079  -12918  143624   46464   20225   8218 -130228  2584952   \n",
       "20200316 永安期货 -13978  -16476  151123   33964  -42109  22810 -117694  2870598   \n",
       "20200317 永安期货  -8588  -29107  145799   12140  -40040  36356 -146159  2267793   \n",
       "20200318 永安期货  11797  -17615  135754   23492  -48660  41301 -171976  2183291   \n",
       "20200319 永安期货   2078    5074  152859   31274    1732  26938 -167181  2622175   \n",
       "20200320 永安期货  -3166   11566  147127   27044    3220  24390 -172173  2568459   \n",
       "20200323 永安期货 -13183    3140  119876   38813   14832  80954 -169100  1996112   \n",
       "20200324 永安期货  -8555  -27041  105171   36049   52967  56120 -229451  2740776   \n",
       "20200325 永安期货 -13398  -24110  128955    9363   56927  45126 -239647  2364524   \n",
       "20200326 永安期货 -11461  -19612  132666  -36983   43502  23322 -276149  1690348   \n",
       "20200327 永安期货 -10952  -49356  105290  -44524   13376  19804 -251519  1607639   \n",
       "20200330 永安期货 -14411  -44639   72875  -59097   43878  12681 -196311  1199832   \n",
       "20200331 永安期货 -16185  -58283   76143  -67403   46809  27549 -193771   932421   \n",
       "20200401 永安期货 -15220  -95946   81442  -35859   81430  17476 -189120   309687   \n",
       "20200402 永安期货 -13332  -70115  101201  -30975   95716   2623 -107866   546431   \n",
       "20200403 永安期货 -15477  -80941   88234  -25277   94542   8107  -78327   822433   \n",
       "20200407 永安期货 -11368  -80411   92641   16918  137517   9926  -89360  1984305   \n",
       "20200408 永安期货  -7830  -87429   90429   18065   97665   2786 -134955  2813734   \n",
       "20200409 永安期货 -10651 -101084   91077   24021  113418  -3637  -25637  2670050   \n",
       "20200410 永安期货 -12084  -85538  115039   29880  227880    545  -18416  3503899   \n",
       "20200413 永安期货 -11709 -146306   80099   33583  210414  -5543  -63649  3151101   \n",
       "20200414 永安期货 -11954 -137605   76218   33771  114420 -24412  -43180  2710748   \n",
       "20200415 永安期货  -6678  -78236   74798   52842   -2598  35561  -48452  2376220   \n",
       "20200416 永安期货  -3873  -66570   73970  107561   33396  43152  -91085  2309153   \n",
       "20200417 永安期货  -3285  -98565   75660  102129   91921 -13793  -89438  1953567   \n",
       "20200420 永安期货   -372  -64954   67771   86121  109765  11492 -222708  1810302   \n",
       "20200421 永安期货  -1091  -99214   64535  110164  130484  23817 -167999  1714688   \n",
       "20200422 永安期货   1701  -96324   82368   96075  172989  56414 -176409  1949009   \n",
       "20200423 永安期货  11836  -62690   77020  111598  222253  81106 -157540  2261150   \n",
       "20200424 永安期货   8917  -79097   79971  147191  200938  31838 -142008  2364006   \n",
       "20200427 永安期货   8647  -98247   89565  157386  186147  38134 -129622  2309809   \n",
       "20200428 永安期货   9131  -98690   90228  130179  169130   7360 -136044  1818277   \n",
       "20200429 永安期货  11002  -83486   99056   82611  116044   3689 -131942  1918854   \n",
       "20200430 永安期货   9542  -84645  108476   94165  138620  22250 -123258  2883589   \n",
       "20200506 永安期货  12005  -89243  111749  133085  140462  15776 -139669  2926557   \n",
       "20200507 永安期货  -9088 -101621  122216  116924  129597  11070 -136553  3528170   \n",
       "20200508 永安期货  -7621 -117570  115274  119495  128930  10967 -142095  3427475   \n",
       "20200511 永安期货   8395  -99223  117037   91872   83558   7524 -129599  3456647   \n",
       "\n",
       "variety           工业品    化工板块 max min  \n",
       "date     会员简称                          \n",
       "20200302 永安期货  386111  155564   V  MA  \n",
       "20200303 永安期货  403162  175000   V  RU  \n",
       "20200304 永安期货  548168  172859   V  MA  \n",
       "20200305 永安期货  558203  122198   V  MA  \n",
       "20200306 永安期货  478137  128105   V  RU  \n",
       "20200309 永安期货  445132  129510   V  RU  \n",
       "20200310 永安期货  664653  123768   V  RU  \n",
       "20200311 永安期货  723774  133344   V  MA  \n",
       "20200312 永安期货  581648   85941   V  RU  \n",
       "20200313 永安期货  489821   58306   V  RU  \n",
       "20200316 永安期货  412635   17640   V  PP  \n",
       "20200317 永安期货  214572  -29599   V  PP  \n",
       "20200318 永安期货  137680  -25907   V  PP  \n",
       "20200319 永安期货  262490   52774   V  PP  \n",
       "20200320 永安期货  206366   38008   V  RU  \n",
       "20200323 永安期货    4251   75332   V  RU  \n",
       "20200324 永安期货  101255  -14740   V  MA  \n",
       "20200325 永安期货   -1563  -36784   V  MA  \n",
       "20200326 永安期货 -106656 -144715   V   L  \n",
       "20200327 永安期货 -147108 -217881   V  MA  \n",
       "20200330 永安期货 -259374 -185024   V   L  \n",
       "20200331 永安期货 -299673 -185141   V   L  \n",
       "20200401 永安期货 -513903 -155797   V  MA  \n",
       "20200402 永安期货 -419471  -22748   V  MA  \n",
       "20200403 永安期货 -325012   -9139  PP  MA  \n",
       "20200407 永安期货  -39788   75863  PP  MA  \n",
       "20200408 永安期货  285003  -21269  PP  MA  \n",
       "20200409 永安期货  403395   87507  PP  MA  \n",
       "20200410 永安期货  733011  257306  PP  MA  \n",
       "20200413 永安期货  589161   96889  PP  MA  \n",
       "20200414 永安期货  499413    7258  PP  MA  \n",
       "20200415 永安期货  370684   27237   V  MA  \n",
       "20200416 永安期货  448219   96551   L  MA  \n",
       "20200417 永安期货  296570   64629   L  MA  \n",
       "20200420 永安期货  193720  -12885  PP  MA  \n",
       "20200421 永安期货  215054   60696  PP  MA  \n",
       "20200422 永安期货  246564  136814  PP  MA  \n",
       "20200423 永安期货  304352  283583  PP  MA  \n",
       "20200424 永安期货  371013  247750  PP  MA  \n",
       "20200427 永安期货  317666  252010  PP  MA  \n",
       "20200428 永安期货  154319  171294  PP  MA  \n",
       "20200429 永安期货  120192   96974  PP  MA  \n",
       "20200430 永安期货  456494  165150  PP  MA  \n",
       "20200506 永安期货  488702  184165  PP  MA  \n",
       "20200507 永安期货  691206  132545  PP  MA  \n",
       "20200508 永安期货  612268  107380  PP  MA  \n",
       "20200511 永安期货  607290   79564   V  MA  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chemical=sz.copy()\n",
    "chemical=chemical[['RU','MA','V','L','PP','BU','TA','商品板块','工业品','化工板块']]\n",
    "chemical['max']=chemical[['RU','MA','V','L','PP','BU','TA']].idxmax(axis=1)\n",
    "chemical['min']=chemical[['RU','MA','V','L','PP','BU']].idxmin(axis=1)\n",
    "chemical['20200220':]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>RB</th>\n",
       "      <th>HC</th>\n",
       "      <th>ZC</th>\n",
       "      <th>J</th>\n",
       "      <th>JM</th>\n",
       "      <th>I</th>\n",
       "      <th>黑色板块</th>\n",
       "      <th>工业品</th>\n",
       "      <th>商品板块</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-52936</td>\n",
       "      <td>16585</td>\n",
       "      <td>-4330</td>\n",
       "      <td>-49754</td>\n",
       "      <td>29168</td>\n",
       "      <td>71121</td>\n",
       "      <td>9854</td>\n",
       "      <td>386111</td>\n",
       "      <td>2242503</td>\n",
       "      <td>I</td>\n",
       "      <td>RB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-6479</td>\n",
       "      <td>27036</td>\n",
       "      <td>-4651</td>\n",
       "      <td>-65664</td>\n",
       "      <td>24551</td>\n",
       "      <td>68375</td>\n",
       "      <td>43168</td>\n",
       "      <td>403162</td>\n",
       "      <td>2321892</td>\n",
       "      <td>I</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-28264</td>\n",
       "      <td>26765</td>\n",
       "      <td>-6569</td>\n",
       "      <td>-42389</td>\n",
       "      <td>24484</td>\n",
       "      <td>211451</td>\n",
       "      <td>185478</td>\n",
       "      <td>548168</td>\n",
       "      <td>3081902</td>\n",
       "      <td>I</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-46098</td>\n",
       "      <td>28450</td>\n",
       "      <td>-4749</td>\n",
       "      <td>-16906</td>\n",
       "      <td>17499</td>\n",
       "      <td>243922</td>\n",
       "      <td>222118</td>\n",
       "      <td>558203</td>\n",
       "      <td>3259601</td>\n",
       "      <td>I</td>\n",
       "      <td>RB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-37361</td>\n",
       "      <td>24827</td>\n",
       "      <td>-7000</td>\n",
       "      <td>-43902</td>\n",
       "      <td>32075</td>\n",
       "      <td>165363</td>\n",
       "      <td>134002</td>\n",
       "      <td>478137</td>\n",
       "      <td>2988019</td>\n",
       "      <td>I</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>43766</td>\n",
       "      <td>24466</td>\n",
       "      <td>-17589</td>\n",
       "      <td>-29023</td>\n",
       "      <td>32661</td>\n",
       "      <td>83142</td>\n",
       "      <td>137423</td>\n",
       "      <td>445132</td>\n",
       "      <td>2518960</td>\n",
       "      <td>I</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>187896</td>\n",
       "      <td>27238</td>\n",
       "      <td>-13860</td>\n",
       "      <td>-6302</td>\n",
       "      <td>23123</td>\n",
       "      <td>103050</td>\n",
       "      <td>321145</td>\n",
       "      <td>664653</td>\n",
       "      <td>2953085</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>277939</td>\n",
       "      <td>23943</td>\n",
       "      <td>-17018</td>\n",
       "      <td>6686</td>\n",
       "      <td>27459</td>\n",
       "      <td>120626</td>\n",
       "      <td>439635</td>\n",
       "      <td>723774</td>\n",
       "      <td>3086349</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>239852</td>\n",
       "      <td>44668</td>\n",
       "      <td>-27849</td>\n",
       "      <td>2722</td>\n",
       "      <td>22515</td>\n",
       "      <td>128459</td>\n",
       "      <td>410367</td>\n",
       "      <td>581648</td>\n",
       "      <td>2449221</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>198890</td>\n",
       "      <td>28899</td>\n",
       "      <td>-19992</td>\n",
       "      <td>39110</td>\n",
       "      <td>35034</td>\n",
       "      <td>36804</td>\n",
       "      <td>318745</td>\n",
       "      <td>489821</td>\n",
       "      <td>2584952</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>216451</td>\n",
       "      <td>33845</td>\n",
       "      <td>-25396</td>\n",
       "      <td>21439</td>\n",
       "      <td>67434</td>\n",
       "      <td>42206</td>\n",
       "      <td>355979</td>\n",
       "      <td>412635</td>\n",
       "      <td>2870598</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>108717</td>\n",
       "      <td>33475</td>\n",
       "      <td>-24671</td>\n",
       "      <td>-16935</td>\n",
       "      <td>60686</td>\n",
       "      <td>73981</td>\n",
       "      <td>235253</td>\n",
       "      <td>214572</td>\n",
       "      <td>2267793</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>112667</td>\n",
       "      <td>10646</td>\n",
       "      <td>-37466</td>\n",
       "      <td>-5683</td>\n",
       "      <td>43830</td>\n",
       "      <td>32167</td>\n",
       "      <td>156161</td>\n",
       "      <td>137680</td>\n",
       "      <td>2183291</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>84465</td>\n",
       "      <td>-8856</td>\n",
       "      <td>-51382</td>\n",
       "      <td>29325</td>\n",
       "      <td>31103</td>\n",
       "      <td>102720</td>\n",
       "      <td>187375</td>\n",
       "      <td>262490</td>\n",
       "      <td>2622175</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>124940</td>\n",
       "      <td>-8067</td>\n",
       "      <td>-41130</td>\n",
       "      <td>21699</td>\n",
       "      <td>30323</td>\n",
       "      <td>2636</td>\n",
       "      <td>130401</td>\n",
       "      <td>206366</td>\n",
       "      <td>2568459</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>102906</td>\n",
       "      <td>-20324</td>\n",
       "      <td>-53323</td>\n",
       "      <td>28759</td>\n",
       "      <td>42985</td>\n",
       "      <td>-110273</td>\n",
       "      <td>-9270</td>\n",
       "      <td>4251</td>\n",
       "      <td>1996112</td>\n",
       "      <td>RB</td>\n",
       "      <td>I</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>96156</td>\n",
       "      <td>-22051</td>\n",
       "      <td>-40799</td>\n",
       "      <td>55705</td>\n",
       "      <td>52099</td>\n",
       "      <td>-15024</td>\n",
       "      <td>126086</td>\n",
       "      <td>101255</td>\n",
       "      <td>2740776</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>90248</td>\n",
       "      <td>-43263</td>\n",
       "      <td>-46143</td>\n",
       "      <td>67157</td>\n",
       "      <td>47345</td>\n",
       "      <td>-15371</td>\n",
       "      <td>99973</td>\n",
       "      <td>-1563</td>\n",
       "      <td>2364524</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>96372</td>\n",
       "      <td>-32570</td>\n",
       "      <td>-44297</td>\n",
       "      <td>72863</td>\n",
       "      <td>40177</td>\n",
       "      <td>-33439</td>\n",
       "      <td>99106</td>\n",
       "      <td>-106656</td>\n",
       "      <td>1690348</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>71298</td>\n",
       "      <td>-30253</td>\n",
       "      <td>-48856</td>\n",
       "      <td>68367</td>\n",
       "      <td>46139</td>\n",
       "      <td>-36739</td>\n",
       "      <td>69956</td>\n",
       "      <td>-147108</td>\n",
       "      <td>1607639</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-24024</td>\n",
       "      <td>-71612</td>\n",
       "      <td>-82456</td>\n",
       "      <td>47106</td>\n",
       "      <td>49368</td>\n",
       "      <td>-6868</td>\n",
       "      <td>-88486</td>\n",
       "      <td>-259374</td>\n",
       "      <td>1199832</td>\n",
       "      <td>JM</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-37952</td>\n",
       "      <td>-45528</td>\n",
       "      <td>-79432</td>\n",
       "      <td>-10106</td>\n",
       "      <td>49368</td>\n",
       "      <td>6347</td>\n",
       "      <td>-117303</td>\n",
       "      <td>-299673</td>\n",
       "      <td>932421</td>\n",
       "      <td>JM</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-208876</td>\n",
       "      <td>-81520</td>\n",
       "      <td>-54421</td>\n",
       "      <td>-46039</td>\n",
       "      <td>28178</td>\n",
       "      <td>-13243</td>\n",
       "      <td>-375921</td>\n",
       "      <td>-513903</td>\n",
       "      <td>309687</td>\n",
       "      <td>JM</td>\n",
       "      <td>RB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-259260</td>\n",
       "      <td>-86840</td>\n",
       "      <td>-43747</td>\n",
       "      <td>-7688</td>\n",
       "      <td>12948</td>\n",
       "      <td>-8946</td>\n",
       "      <td>-393533</td>\n",
       "      <td>-419471</td>\n",
       "      <td>546431</td>\n",
       "      <td>JM</td>\n",
       "      <td>RB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-163559</td>\n",
       "      <td>-88180</td>\n",
       "      <td>-57453</td>\n",
       "      <td>-50737</td>\n",
       "      <td>9055</td>\n",
       "      <td>35811</td>\n",
       "      <td>-315063</td>\n",
       "      <td>-325012</td>\n",
       "      <td>822433</td>\n",
       "      <td>I</td>\n",
       "      <td>RB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-76749</td>\n",
       "      <td>-81699</td>\n",
       "      <td>-39176</td>\n",
       "      <td>-29269</td>\n",
       "      <td>-1801</td>\n",
       "      <td>84990</td>\n",
       "      <td>-143704</td>\n",
       "      <td>-39788</td>\n",
       "      <td>1984305</td>\n",
       "      <td>I</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>72633</td>\n",
       "      <td>-38715</td>\n",
       "      <td>-34111</td>\n",
       "      <td>29581</td>\n",
       "      <td>-4234</td>\n",
       "      <td>187760</td>\n",
       "      <td>212914</td>\n",
       "      <td>285003</td>\n",
       "      <td>2813734</td>\n",
       "      <td>I</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>123825</td>\n",
       "      <td>-74448</td>\n",
       "      <td>-36113</td>\n",
       "      <td>-23103</td>\n",
       "      <td>16354</td>\n",
       "      <td>228132</td>\n",
       "      <td>234647</td>\n",
       "      <td>403395</td>\n",
       "      <td>2670050</td>\n",
       "      <td>I</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>238155</td>\n",
       "      <td>-80660</td>\n",
       "      <td>-31825</td>\n",
       "      <td>-6136</td>\n",
       "      <td>13506</td>\n",
       "      <td>211064</td>\n",
       "      <td>344104</td>\n",
       "      <td>733011</td>\n",
       "      <td>3503899</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>356553</td>\n",
       "      <td>-83454</td>\n",
       "      <td>-27902</td>\n",
       "      <td>711</td>\n",
       "      <td>10450</td>\n",
       "      <td>159600</td>\n",
       "      <td>415958</td>\n",
       "      <td>589161</td>\n",
       "      <td>3151101</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>324972</td>\n",
       "      <td>-99527</td>\n",
       "      <td>-44192</td>\n",
       "      <td>-9690</td>\n",
       "      <td>6802</td>\n",
       "      <td>241026</td>\n",
       "      <td>419391</td>\n",
       "      <td>499413</td>\n",
       "      <td>2710748</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>232765</td>\n",
       "      <td>-92408</td>\n",
       "      <td>-59720</td>\n",
       "      <td>-42274</td>\n",
       "      <td>13642</td>\n",
       "      <td>203303</td>\n",
       "      <td>255308</td>\n",
       "      <td>370684</td>\n",
       "      <td>2376220</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>239553</td>\n",
       "      <td>-76463</td>\n",
       "      <td>-54986</td>\n",
       "      <td>-46941</td>\n",
       "      <td>12450</td>\n",
       "      <td>160393</td>\n",
       "      <td>234006</td>\n",
       "      <td>448219</td>\n",
       "      <td>2309153</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>157866</td>\n",
       "      <td>-85581</td>\n",
       "      <td>-56696</td>\n",
       "      <td>-40606</td>\n",
       "      <td>19285</td>\n",
       "      <td>86750</td>\n",
       "      <td>81018</td>\n",
       "      <td>296570</td>\n",
       "      <td>1953567</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>112180</td>\n",
       "      <td>-73950</td>\n",
       "      <td>-56638</td>\n",
       "      <td>-32814</td>\n",
       "      <td>14620</td>\n",
       "      <td>101259</td>\n",
       "      <td>64657</td>\n",
       "      <td>193720</td>\n",
       "      <td>1810302</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>140905</td>\n",
       "      <td>-68084</td>\n",
       "      <td>-55205</td>\n",
       "      <td>-42145</td>\n",
       "      <td>21090</td>\n",
       "      <td>84037</td>\n",
       "      <td>80598</td>\n",
       "      <td>215054</td>\n",
       "      <td>1714688</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>105061</td>\n",
       "      <td>-70899</td>\n",
       "      <td>-76425</td>\n",
       "      <td>-39918</td>\n",
       "      <td>8574</td>\n",
       "      <td>127502</td>\n",
       "      <td>53895</td>\n",
       "      <td>246564</td>\n",
       "      <td>1949009</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>140807</td>\n",
       "      <td>-87333</td>\n",
       "      <td>-74262</td>\n",
       "      <td>-101726</td>\n",
       "      <td>-4965</td>\n",
       "      <td>83926</td>\n",
       "      <td>-43553</td>\n",
       "      <td>304352</td>\n",
       "      <td>2261150</td>\n",
       "      <td>RB</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>191785</td>\n",
       "      <td>-78926</td>\n",
       "      <td>-79310</td>\n",
       "      <td>-54095</td>\n",
       "      <td>-18765</td>\n",
       "      <td>90276</td>\n",
       "      <td>50965</td>\n",
       "      <td>371013</td>\n",
       "      <td>2364006</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>128088</td>\n",
       "      <td>-84903</td>\n",
       "      <td>-92854</td>\n",
       "      <td>-49177</td>\n",
       "      <td>-20440</td>\n",
       "      <td>115250</td>\n",
       "      <td>-4036</td>\n",
       "      <td>317666</td>\n",
       "      <td>2309809</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>66875</td>\n",
       "      <td>-87013</td>\n",
       "      <td>-88276</td>\n",
       "      <td>-76501</td>\n",
       "      <td>-31187</td>\n",
       "      <td>96233</td>\n",
       "      <td>-119869</td>\n",
       "      <td>154319</td>\n",
       "      <td>1818277</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>67141</td>\n",
       "      <td>-73670</td>\n",
       "      <td>-45235</td>\n",
       "      <td>-82504</td>\n",
       "      <td>-30511</td>\n",
       "      <td>107828</td>\n",
       "      <td>-56951</td>\n",
       "      <td>120192</td>\n",
       "      <td>1918854</td>\n",
       "      <td>I</td>\n",
       "      <td>J</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>157291</td>\n",
       "      <td>-45385</td>\n",
       "      <td>-46524</td>\n",
       "      <td>-41369</td>\n",
       "      <td>-15277</td>\n",
       "      <td>171029</td>\n",
       "      <td>179765</td>\n",
       "      <td>456494</td>\n",
       "      <td>2883589</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>183320</td>\n",
       "      <td>-51595</td>\n",
       "      <td>-51288</td>\n",
       "      <td>-40250</td>\n",
       "      <td>-8792</td>\n",
       "      <td>150887</td>\n",
       "      <td>182282</td>\n",
       "      <td>488702</td>\n",
       "      <td>2926557</td>\n",
       "      <td>RB</td>\n",
       "      <td>HC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>186386</td>\n",
       "      <td>-40483</td>\n",
       "      <td>-65170</td>\n",
       "      <td>-21755</td>\n",
       "      <td>-6410</td>\n",
       "      <td>313692</td>\n",
       "      <td>366260</td>\n",
       "      <td>691206</td>\n",
       "      <td>3528170</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>211967</td>\n",
       "      <td>-40496</td>\n",
       "      <td>-67815</td>\n",
       "      <td>-32209</td>\n",
       "      <td>7119</td>\n",
       "      <td>212163</td>\n",
       "      <td>290729</td>\n",
       "      <td>612268</td>\n",
       "      <td>3427475</td>\n",
       "      <td>I</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>211051</td>\n",
       "      <td>-32799</td>\n",
       "      <td>-58075</td>\n",
       "      <td>-35598</td>\n",
       "      <td>7538</td>\n",
       "      <td>183097</td>\n",
       "      <td>275214</td>\n",
       "      <td>607290</td>\n",
       "      <td>3456647</td>\n",
       "      <td>RB</td>\n",
       "      <td>ZC</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety            RB     HC     ZC       J     JM       I    黑色板块     工业品  \\\n",
       "date     会员简称                                                                \n",
       "20200302 永安期货  -52936  16585  -4330  -49754  29168   71121    9854  386111   \n",
       "20200303 永安期货   -6479  27036  -4651  -65664  24551   68375   43168  403162   \n",
       "20200304 永安期货  -28264  26765  -6569  -42389  24484  211451  185478  548168   \n",
       "20200305 永安期货  -46098  28450  -4749  -16906  17499  243922  222118  558203   \n",
       "20200306 永安期货  -37361  24827  -7000  -43902  32075  165363  134002  478137   \n",
       "20200309 永安期货   43766  24466 -17589  -29023  32661   83142  137423  445132   \n",
       "20200310 永安期货  187896  27238 -13860   -6302  23123  103050  321145  664653   \n",
       "20200311 永安期货  277939  23943 -17018    6686  27459  120626  439635  723774   \n",
       "20200312 永安期货  239852  44668 -27849    2722  22515  128459  410367  581648   \n",
       "20200313 永安期货  198890  28899 -19992   39110  35034   36804  318745  489821   \n",
       "20200316 永安期货  216451  33845 -25396   21439  67434   42206  355979  412635   \n",
       "20200317 永安期货  108717  33475 -24671  -16935  60686   73981  235253  214572   \n",
       "20200318 永安期货  112667  10646 -37466   -5683  43830   32167  156161  137680   \n",
       "20200319 永安期货   84465  -8856 -51382   29325  31103  102720  187375  262490   \n",
       "20200320 永安期货  124940  -8067 -41130   21699  30323    2636  130401  206366   \n",
       "20200323 永安期货  102906 -20324 -53323   28759  42985 -110273   -9270    4251   \n",
       "20200324 永安期货   96156 -22051 -40799   55705  52099  -15024  126086  101255   \n",
       "20200325 永安期货   90248 -43263 -46143   67157  47345  -15371   99973   -1563   \n",
       "20200326 永安期货   96372 -32570 -44297   72863  40177  -33439   99106 -106656   \n",
       "20200327 永安期货   71298 -30253 -48856   68367  46139  -36739   69956 -147108   \n",
       "20200330 永安期货  -24024 -71612 -82456   47106  49368   -6868  -88486 -259374   \n",
       "20200331 永安期货  -37952 -45528 -79432  -10106  49368    6347 -117303 -299673   \n",
       "20200401 永安期货 -208876 -81520 -54421  -46039  28178  -13243 -375921 -513903   \n",
       "20200402 永安期货 -259260 -86840 -43747   -7688  12948   -8946 -393533 -419471   \n",
       "20200403 永安期货 -163559 -88180 -57453  -50737   9055   35811 -315063 -325012   \n",
       "20200407 永安期货  -76749 -81699 -39176  -29269  -1801   84990 -143704  -39788   \n",
       "20200408 永安期货   72633 -38715 -34111   29581  -4234  187760  212914  285003   \n",
       "20200409 永安期货  123825 -74448 -36113  -23103  16354  228132  234647  403395   \n",
       "20200410 永安期货  238155 -80660 -31825   -6136  13506  211064  344104  733011   \n",
       "20200413 永安期货  356553 -83454 -27902     711  10450  159600  415958  589161   \n",
       "20200414 永安期货  324972 -99527 -44192   -9690   6802  241026  419391  499413   \n",
       "20200415 永安期货  232765 -92408 -59720  -42274  13642  203303  255308  370684   \n",
       "20200416 永安期货  239553 -76463 -54986  -46941  12450  160393  234006  448219   \n",
       "20200417 永安期货  157866 -85581 -56696  -40606  19285   86750   81018  296570   \n",
       "20200420 永安期货  112180 -73950 -56638  -32814  14620  101259   64657  193720   \n",
       "20200421 永安期货  140905 -68084 -55205  -42145  21090   84037   80598  215054   \n",
       "20200422 永安期货  105061 -70899 -76425  -39918   8574  127502   53895  246564   \n",
       "20200423 永安期货  140807 -87333 -74262 -101726  -4965   83926  -43553  304352   \n",
       "20200424 永安期货  191785 -78926 -79310  -54095 -18765   90276   50965  371013   \n",
       "20200427 永安期货  128088 -84903 -92854  -49177 -20440  115250   -4036  317666   \n",
       "20200428 永安期货   66875 -87013 -88276  -76501 -31187   96233 -119869  154319   \n",
       "20200429 永安期货   67141 -73670 -45235  -82504 -30511  107828  -56951  120192   \n",
       "20200430 永安期货  157291 -45385 -46524  -41369 -15277  171029  179765  456494   \n",
       "20200506 永安期货  183320 -51595 -51288  -40250  -8792  150887  182282  488702   \n",
       "20200507 永安期货  186386 -40483 -65170  -21755  -6410  313692  366260  691206   \n",
       "20200508 永安期货  211967 -40496 -67815  -32209   7119  212163  290729  612268   \n",
       "20200511 永安期货  211051 -32799 -58075  -35598   7538  183097  275214  607290   \n",
       "\n",
       "variety           商品板块 max min  \n",
       "date     会员简称                   \n",
       "20200302 永安期货  2242503   I  RB  \n",
       "20200303 永安期货  2321892   I   J  \n",
       "20200304 永安期货  3081902   I   J  \n",
       "20200305 永安期货  3259601   I  RB  \n",
       "20200306 永安期货  2988019   I   J  \n",
       "20200309 永安期货  2518960   I   J  \n",
       "20200310 永安期货  2953085  RB  ZC  \n",
       "20200311 永安期货  3086349  RB  ZC  \n",
       "20200312 永安期货  2449221  RB  ZC  \n",
       "20200313 永安期货  2584952  RB  ZC  \n",
       "20200316 永安期货  2870598  RB  ZC  \n",
       "20200317 永安期货  2267793  RB  ZC  \n",
       "20200318 永安期货  2183291  RB  ZC  \n",
       "20200319 永安期货  2622175   I  ZC  \n",
       "20200320 永安期货  2568459  RB  ZC  \n",
       "20200323 永安期货  1996112  RB   I  \n",
       "20200324 永安期货  2740776  RB  ZC  \n",
       "20200325 永安期货  2364524  RB  ZC  \n",
       "20200326 永安期货  1690348  RB  ZC  \n",
       "20200327 永安期货  1607639  RB  ZC  \n",
       "20200330 永安期货  1199832  JM  ZC  \n",
       "20200331 永安期货   932421  JM  ZC  \n",
       "20200401 永安期货   309687  JM  RB  \n",
       "20200402 永安期货   546431  JM  RB  \n",
       "20200403 永安期货   822433   I  RB  \n",
       "20200407 永安期货  1984305   I  HC  \n",
       "20200408 永安期货  2813734   I  HC  \n",
       "20200409 永安期货  2670050   I  HC  \n",
       "20200410 永安期货  3503899  RB  HC  \n",
       "20200413 永安期货  3151101  RB  HC  \n",
       "20200414 永安期货  2710748  RB  HC  \n",
       "20200415 永安期货  2376220  RB  HC  \n",
       "20200416 永安期货  2309153  RB  HC  \n",
       "20200417 永安期货  1953567  RB  HC  \n",
       "20200420 永安期货  1810302  RB  HC  \n",
       "20200421 永安期货  1714688  RB  HC  \n",
       "20200422 永安期货  1949009   I  ZC  \n",
       "20200423 永安期货  2261150  RB   J  \n",
       "20200424 永安期货  2364006  RB  ZC  \n",
       "20200427 永安期货  2309809  RB  ZC  \n",
       "20200428 永安期货  1818277   I  ZC  \n",
       "20200429 永安期货  1918854   I   J  \n",
       "20200430 永安期货  2883589   I  ZC  \n",
       "20200506 永安期货  2926557  RB  HC  \n",
       "20200507 永安期货  3528170   I  ZC  \n",
       "20200508 永安期货  3427475   I  ZC  \n",
       "20200511 永安期货  3456647  RB  ZC  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "黑色板块=sz.copy()\n",
    "黑色板块=黑色板块[['RB','HC','ZC','J','JM','I','黑色板块','工业品','商品板块']] \n",
    "黑色板块['max']=黑色板块[['RB','HC','ZC','J','JM','I']].idxmax(axis=1) \n",
    "黑色板块['min']=黑色板块[['RB','HC','ZC','J','JM','I']].idxmin(axis=1)\n",
    "黑色板块['20200220':]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# import json\n",
    "# from pymongo import MongoClient\n",
    "# # 连接数据库\n",
    "# client = MongoClient('localhost', 27017)\n",
    "# db = client.futures\n",
    "# flow = db.flow\n",
    "# 黑色板块=sz.copy()\n",
    "# 黑色板块=黑色板块[['RB','HC','ZC','J','JM','I','黑色板块','工业品','商品板块']] \n",
    "# 黑色板块['max']=黑色板块[['RB','HC','ZC','J','JM','I']].idxmax(axis=1) \n",
    "# 黑色板块['min']=黑色板块[['RB','HC','ZC','J','JM','I']].idxmin(axis=1)\n",
    "# df = 黑色板块.reset_index()\n",
    "# flow.insert_many(json.loads(df.T.to_json()).values())\n",
    "# print(\"写入OK\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>Y</th>\n",
       "      <th>P</th>\n",
       "      <th>OI</th>\n",
       "      <th>油脂板块</th>\n",
       "      <th>农产品</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>92120</td>\n",
       "      <td>12233</td>\n",
       "      <td>32881</td>\n",
       "      <td>137234</td>\n",
       "      <td>553749</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>80683</td>\n",
       "      <td>20454</td>\n",
       "      <td>27793</td>\n",
       "      <td>128930</td>\n",
       "      <td>537433</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>83854</td>\n",
       "      <td>32231</td>\n",
       "      <td>37725</td>\n",
       "      <td>153810</td>\n",
       "      <td>570731</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>108578</td>\n",
       "      <td>18485</td>\n",
       "      <td>35972</td>\n",
       "      <td>163035</td>\n",
       "      <td>608719</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>105115</td>\n",
       "      <td>-4783</td>\n",
       "      <td>35807</td>\n",
       "      <td>136139</td>\n",
       "      <td>571283</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>98543</td>\n",
       "      <td>-23439</td>\n",
       "      <td>33611</td>\n",
       "      <td>108715</td>\n",
       "      <td>597436</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>93423</td>\n",
       "      <td>-16580</td>\n",
       "      <td>28903</td>\n",
       "      <td>105746</td>\n",
       "      <td>479806</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>96851</td>\n",
       "      <td>-19569</td>\n",
       "      <td>18754</td>\n",
       "      <td>96036</td>\n",
       "      <td>444330</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>64618</td>\n",
       "      <td>-5036</td>\n",
       "      <td>29477</td>\n",
       "      <td>89059</td>\n",
       "      <td>487568</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>79860</td>\n",
       "      <td>2423</td>\n",
       "      <td>19824</td>\n",
       "      <td>102107</td>\n",
       "      <td>561647</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>69298</td>\n",
       "      <td>9750</td>\n",
       "      <td>17718</td>\n",
       "      <td>96766</td>\n",
       "      <td>588268</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>57193</td>\n",
       "      <td>37974</td>\n",
       "      <td>6095</td>\n",
       "      <td>101262</td>\n",
       "      <td>569533</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>59691</td>\n",
       "      <td>100884</td>\n",
       "      <td>15225</td>\n",
       "      <td>175800</td>\n",
       "      <td>600540</td>\n",
       "      <td>P</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>54186</td>\n",
       "      <td>126157</td>\n",
       "      <td>13389</td>\n",
       "      <td>193732</td>\n",
       "      <td>645212</td>\n",
       "      <td>P</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>58042</td>\n",
       "      <td>102493</td>\n",
       "      <td>14927</td>\n",
       "      <td>175462</td>\n",
       "      <td>635652</td>\n",
       "      <td>P</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>114282</td>\n",
       "      <td>66056</td>\n",
       "      <td>9493</td>\n",
       "      <td>189831</td>\n",
       "      <td>556072</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>125302</td>\n",
       "      <td>113942</td>\n",
       "      <td>5143</td>\n",
       "      <td>244387</td>\n",
       "      <td>717309</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>158921</td>\n",
       "      <td>116878</td>\n",
       "      <td>-3526</td>\n",
       "      <td>272273</td>\n",
       "      <td>660158</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>124888</td>\n",
       "      <td>70317</td>\n",
       "      <td>-3248</td>\n",
       "      <td>191957</td>\n",
       "      <td>526321</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>129895</td>\n",
       "      <td>29587</td>\n",
       "      <td>33789</td>\n",
       "      <td>193271</td>\n",
       "      <td>535391</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>117694</td>\n",
       "      <td>18013</td>\n",
       "      <td>44227</td>\n",
       "      <td>179934</td>\n",
       "      <td>492159</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>101559</td>\n",
       "      <td>-1397</td>\n",
       "      <td>46452</td>\n",
       "      <td>146614</td>\n",
       "      <td>440755</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>103435</td>\n",
       "      <td>29202</td>\n",
       "      <td>56382</td>\n",
       "      <td>189019</td>\n",
       "      <td>448814</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>99357</td>\n",
       "      <td>7224</td>\n",
       "      <td>47069</td>\n",
       "      <td>153650</td>\n",
       "      <td>392005</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>96973</td>\n",
       "      <td>11146</td>\n",
       "      <td>51659</td>\n",
       "      <td>159778</td>\n",
       "      <td>387736</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>80199</td>\n",
       "      <td>14644</td>\n",
       "      <td>60119</td>\n",
       "      <td>154962</td>\n",
       "      <td>442933</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>104305</td>\n",
       "      <td>7797</td>\n",
       "      <td>2761</td>\n",
       "      <td>114863</td>\n",
       "      <td>441642</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>92057</td>\n",
       "      <td>7240</td>\n",
       "      <td>4776</td>\n",
       "      <td>104073</td>\n",
       "      <td>280302</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>87369</td>\n",
       "      <td>-21954</td>\n",
       "      <td>5417</td>\n",
       "      <td>70832</td>\n",
       "      <td>247442</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>113218</td>\n",
       "      <td>9688</td>\n",
       "      <td>3386</td>\n",
       "      <td>126292</td>\n",
       "      <td>303037</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>97262</td>\n",
       "      <td>-11516</td>\n",
       "      <td>4598</td>\n",
       "      <td>90344</td>\n",
       "      <td>238938</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>99423</td>\n",
       "      <td>2702</td>\n",
       "      <td>3809</td>\n",
       "      <td>105934</td>\n",
       "      <td>250621</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>37735</td>\n",
       "      <td>-9608</td>\n",
       "      <td>6681</td>\n",
       "      <td>34808</td>\n",
       "      <td>193092</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>26426</td>\n",
       "      <td>-17545</td>\n",
       "      <td>2063</td>\n",
       "      <td>10944</td>\n",
       "      <td>167966</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>20481</td>\n",
       "      <td>-13376</td>\n",
       "      <td>2406</td>\n",
       "      <td>9511</td>\n",
       "      <td>205791</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-4180</td>\n",
       "      <td>-47778</td>\n",
       "      <td>4398</td>\n",
       "      <td>-47560</td>\n",
       "      <td>156777</td>\n",
       "      <td>OI</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9221</td>\n",
       "      <td>-20385</td>\n",
       "      <td>4748</td>\n",
       "      <td>-24858</td>\n",
       "      <td>231318</td>\n",
       "      <td>OI</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>46073</td>\n",
       "      <td>-21350</td>\n",
       "      <td>6789</td>\n",
       "      <td>31512</td>\n",
       "      <td>254278</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>50477</td>\n",
       "      <td>-57765</td>\n",
       "      <td>9508</td>\n",
       "      <td>2220</td>\n",
       "      <td>255008</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>58109</td>\n",
       "      <td>-55344</td>\n",
       "      <td>10480</td>\n",
       "      <td>13245</td>\n",
       "      <td>227767</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>57930</td>\n",
       "      <td>-39547</td>\n",
       "      <td>7074</td>\n",
       "      <td>25457</td>\n",
       "      <td>204347</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>32478</td>\n",
       "      <td>17038</td>\n",
       "      <td>8090</td>\n",
       "      <td>57606</td>\n",
       "      <td>244689</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>31697</td>\n",
       "      <td>42535</td>\n",
       "      <td>7935</td>\n",
       "      <td>82167</td>\n",
       "      <td>211158</td>\n",
       "      <td>P</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>40745</td>\n",
       "      <td>29462</td>\n",
       "      <td>12562</td>\n",
       "      <td>82769</td>\n",
       "      <td>161228</td>\n",
       "      <td>Y</td>\n",
       "      <td>OI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>52299</td>\n",
       "      <td>-26472</td>\n",
       "      <td>19769</td>\n",
       "      <td>45596</td>\n",
       "      <td>172370</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>48244</td>\n",
       "      <td>-3329</td>\n",
       "      <td>16624</td>\n",
       "      <td>61539</td>\n",
       "      <td>237805</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>60226</td>\n",
       "      <td>3096</td>\n",
       "      <td>20776</td>\n",
       "      <td>84098</td>\n",
       "      <td>290673</td>\n",
       "      <td>Y</td>\n",
       "      <td>P</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety             Y       P     OI    油脂板块     农产品 max min\n",
       "date     会员简称                                               \n",
       "20200302 永安期货   92120   12233  32881  137234  553749   Y   P\n",
       "20200303 永安期货   80683   20454  27793  128930  537433   Y   P\n",
       "20200304 永安期货   83854   32231  37725  153810  570731   Y   P\n",
       "20200305 永安期货  108578   18485  35972  163035  608719   Y   P\n",
       "20200306 永安期货  105115   -4783  35807  136139  571283   Y   P\n",
       "20200309 永安期货   98543  -23439  33611  108715  597436   Y   P\n",
       "20200310 永安期货   93423  -16580  28903  105746  479806   Y   P\n",
       "20200311 永安期货   96851  -19569  18754   96036  444330   Y   P\n",
       "20200312 永安期货   64618   -5036  29477   89059  487568   Y   P\n",
       "20200313 永安期货   79860    2423  19824  102107  561647   Y   P\n",
       "20200316 永安期货   69298    9750  17718   96766  588268   Y   P\n",
       "20200317 永安期货   57193   37974   6095  101262  569533   Y  OI\n",
       "20200318 永安期货   59691  100884  15225  175800  600540   P  OI\n",
       "20200319 永安期货   54186  126157  13389  193732  645212   P  OI\n",
       "20200320 永安期货   58042  102493  14927  175462  635652   P  OI\n",
       "20200323 永安期货  114282   66056   9493  189831  556072   Y  OI\n",
       "20200324 永安期货  125302  113942   5143  244387  717309   Y  OI\n",
       "20200325 永安期货  158921  116878  -3526  272273  660158   Y  OI\n",
       "20200326 永安期货  124888   70317  -3248  191957  526321   Y  OI\n",
       "20200327 永安期货  129895   29587  33789  193271  535391   Y   P\n",
       "20200330 永安期货  117694   18013  44227  179934  492159   Y   P\n",
       "20200331 永安期货  101559   -1397  46452  146614  440755   Y   P\n",
       "20200401 永安期货  103435   29202  56382  189019  448814   Y   P\n",
       "20200402 永安期货   99357    7224  47069  153650  392005   Y   P\n",
       "20200403 永安期货   96973   11146  51659  159778  387736   Y   P\n",
       "20200407 永安期货   80199   14644  60119  154962  442933   Y   P\n",
       "20200408 永安期货  104305    7797   2761  114863  441642   Y  OI\n",
       "20200409 永安期货   92057    7240   4776  104073  280302   Y  OI\n",
       "20200410 永安期货   87369  -21954   5417   70832  247442   Y   P\n",
       "20200413 永安期货  113218    9688   3386  126292  303037   Y  OI\n",
       "20200414 永安期货   97262  -11516   4598   90344  238938   Y   P\n",
       "20200415 永安期货   99423    2702   3809  105934  250621   Y   P\n",
       "20200416 永安期货   37735   -9608   6681   34808  193092   Y   P\n",
       "20200417 永安期货   26426  -17545   2063   10944  167966   Y   P\n",
       "20200420 永安期货   20481  -13376   2406    9511  205791   Y   P\n",
       "20200421 永安期货   -4180  -47778   4398  -47560  156777  OI   P\n",
       "20200422 永安期货   -9221  -20385   4748  -24858  231318  OI   P\n",
       "20200423 永安期货   46073  -21350   6789   31512  254278   Y   P\n",
       "20200424 永安期货   50477  -57765   9508    2220  255008   Y   P\n",
       "20200427 永安期货   58109  -55344  10480   13245  227767   Y   P\n",
       "20200428 永安期货   57930  -39547   7074   25457  204347   Y   P\n",
       "20200429 永安期货   32478   17038   8090   57606  244689   Y  OI\n",
       "20200430 永安期货   31697   42535   7935   82167  211158   P  OI\n",
       "20200506 永安期货   40745   29462  12562   82769  161228   Y  OI\n",
       "20200507 永安期货   52299  -26472  19769   45596  172370   Y   P\n",
       "20200508 永安期货   48244   -3329  16624   61539  237805   Y   P\n",
       "20200511 永安期货   60226    3096  20776   84098  290673   Y   P"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "oil=sz.copy()\n",
    "oil=oil[['Y','P','OI','油脂板块','农产品']]\n",
    "oil['max']=oil[['Y','P','OI']].idxmax(axis=1) \n",
    "oil['min']=oil[['Y','P','OI']].idxmin(axis=1)\n",
    "oil['20200220':]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>CU</th>\n",
       "      <th>AL</th>\n",
       "      <th>ZN</th>\n",
       "      <th>NI</th>\n",
       "      <th>PB</th>\n",
       "      <th>有色板块</th>\n",
       "      <th>工业品</th>\n",
       "      <th>商品板块</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>293437</td>\n",
       "      <td>-35545</td>\n",
       "      <td>-83502</td>\n",
       "      <td>2587</td>\n",
       "      <td>-21443</td>\n",
       "      <td>155534</td>\n",
       "      <td>386111</td>\n",
       "      <td>2242503</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>268912</td>\n",
       "      <td>-33230</td>\n",
       "      <td>-100258</td>\n",
       "      <td>5584</td>\n",
       "      <td>-20823</td>\n",
       "      <td>120185</td>\n",
       "      <td>403162</td>\n",
       "      <td>2321892</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>300631</td>\n",
       "      <td>-47737</td>\n",
       "      <td>-104068</td>\n",
       "      <td>-6032</td>\n",
       "      <td>-20746</td>\n",
       "      <td>122048</td>\n",
       "      <td>548168</td>\n",
       "      <td>3081902</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>302454</td>\n",
       "      <td>-44373</td>\n",
       "      <td>-122638</td>\n",
       "      <td>35046</td>\n",
       "      <td>-24006</td>\n",
       "      <td>146483</td>\n",
       "      <td>558203</td>\n",
       "      <td>3259601</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>297077</td>\n",
       "      <td>-36945</td>\n",
       "      <td>-110007</td>\n",
       "      <td>17982</td>\n",
       "      <td>-22639</td>\n",
       "      <td>145468</td>\n",
       "      <td>478137</td>\n",
       "      <td>2988019</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>209303</td>\n",
       "      <td>-36033</td>\n",
       "      <td>-109489</td>\n",
       "      <td>53050</td>\n",
       "      <td>-18229</td>\n",
       "      <td>98602</td>\n",
       "      <td>445132</td>\n",
       "      <td>2518960</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>230728</td>\n",
       "      <td>-35925</td>\n",
       "      <td>-104777</td>\n",
       "      <td>82796</td>\n",
       "      <td>-16563</td>\n",
       "      <td>156259</td>\n",
       "      <td>664653</td>\n",
       "      <td>2953085</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>205897</td>\n",
       "      <td>-32334</td>\n",
       "      <td>-98690</td>\n",
       "      <td>43197</td>\n",
       "      <td>-12078</td>\n",
       "      <td>105992</td>\n",
       "      <td>723774</td>\n",
       "      <td>3086349</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>158144</td>\n",
       "      <td>-28419</td>\n",
       "      <td>-95501</td>\n",
       "      <td>37665</td>\n",
       "      <td>-14912</td>\n",
       "      <td>56977</td>\n",
       "      <td>581648</td>\n",
       "      <td>2449221</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>187446</td>\n",
       "      <td>-21835</td>\n",
       "      <td>-85836</td>\n",
       "      <td>35668</td>\n",
       "      <td>-15540</td>\n",
       "      <td>99903</td>\n",
       "      <td>489821</td>\n",
       "      <td>2584952</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>103878</td>\n",
       "      <td>-18772</td>\n",
       "      <td>-81656</td>\n",
       "      <td>38796</td>\n",
       "      <td>-7080</td>\n",
       "      <td>35166</td>\n",
       "      <td>412635</td>\n",
       "      <td>2870598</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>128733</td>\n",
       "      <td>-28778</td>\n",
       "      <td>-106108</td>\n",
       "      <td>33435</td>\n",
       "      <td>-7458</td>\n",
       "      <td>19824</td>\n",
       "      <td>214572</td>\n",
       "      <td>2267793</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>125625</td>\n",
       "      <td>-34869</td>\n",
       "      <td>-98108</td>\n",
       "      <td>10081</td>\n",
       "      <td>2277</td>\n",
       "      <td>5006</td>\n",
       "      <td>137680</td>\n",
       "      <td>2183291</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>120572</td>\n",
       "      <td>-33387</td>\n",
       "      <td>-84413</td>\n",
       "      <td>19851</td>\n",
       "      <td>-4140</td>\n",
       "      <td>18483</td>\n",
       "      <td>262490</td>\n",
       "      <td>2622175</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>128400</td>\n",
       "      <td>-46586</td>\n",
       "      <td>-62047</td>\n",
       "      <td>25421</td>\n",
       "      <td>-3708</td>\n",
       "      <td>41480</td>\n",
       "      <td>206366</td>\n",
       "      <td>2568459</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>73148</td>\n",
       "      <td>-41816</td>\n",
       "      <td>-53148</td>\n",
       "      <td>-43864</td>\n",
       "      <td>-1084</td>\n",
       "      <td>-66764</td>\n",
       "      <td>4251</td>\n",
       "      <td>1996112</td>\n",
       "      <td>CU</td>\n",
       "      <td>ZN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>65655</td>\n",
       "      <td>-40755</td>\n",
       "      <td>-28167</td>\n",
       "      <td>-17271</td>\n",
       "      <td>-1766</td>\n",
       "      <td>-22304</td>\n",
       "      <td>101255</td>\n",
       "      <td>2740776</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>39933</td>\n",
       "      <td>-39440</td>\n",
       "      <td>-22541</td>\n",
       "      <td>-45458</td>\n",
       "      <td>-452</td>\n",
       "      <td>-67958</td>\n",
       "      <td>-1563</td>\n",
       "      <td>2364524</td>\n",
       "      <td>CU</td>\n",
       "      <td>NI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>29954</td>\n",
       "      <td>-39461</td>\n",
       "      <td>-32724</td>\n",
       "      <td>-36533</td>\n",
       "      <td>-47</td>\n",
       "      <td>-78811</td>\n",
       "      <td>-106656</td>\n",
       "      <td>1690348</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>46076</td>\n",
       "      <td>-41927</td>\n",
       "      <td>-23838</td>\n",
       "      <td>-6974</td>\n",
       "      <td>5902</td>\n",
       "      <td>-20761</td>\n",
       "      <td>-147108</td>\n",
       "      <td>1607639</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>54301</td>\n",
       "      <td>-39325</td>\n",
       "      <td>-20443</td>\n",
       "      <td>-14938</td>\n",
       "      <td>4727</td>\n",
       "      <td>-15678</td>\n",
       "      <td>-259374</td>\n",
       "      <td>1199832</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>49788</td>\n",
       "      <td>-36368</td>\n",
       "      <td>-19987</td>\n",
       "      <td>-10084</td>\n",
       "      <td>3140</td>\n",
       "      <td>-13511</td>\n",
       "      <td>-299673</td>\n",
       "      <td>932421</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>52895</td>\n",
       "      <td>-36825</td>\n",
       "      <td>-19051</td>\n",
       "      <td>-15557</td>\n",
       "      <td>1875</td>\n",
       "      <td>-16663</td>\n",
       "      <td>-513903</td>\n",
       "      <td>309687</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>28309</td>\n",
       "      <td>-33086</td>\n",
       "      <td>3442</td>\n",
       "      <td>-23308</td>\n",
       "      <td>5306</td>\n",
       "      <td>-19337</td>\n",
       "      <td>-419471</td>\n",
       "      <td>546431</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>55752</td>\n",
       "      <td>-35544</td>\n",
       "      <td>10359</td>\n",
       "      <td>-14217</td>\n",
       "      <td>-5217</td>\n",
       "      <td>11133</td>\n",
       "      <td>-325012</td>\n",
       "      <td>822433</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>61597</td>\n",
       "      <td>-34209</td>\n",
       "      <td>33032</td>\n",
       "      <td>-4051</td>\n",
       "      <td>-4429</td>\n",
       "      <td>51940</td>\n",
       "      <td>-39788</td>\n",
       "      <td>1984305</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>88641</td>\n",
       "      <td>-27187</td>\n",
       "      <td>36113</td>\n",
       "      <td>23362</td>\n",
       "      <td>-6604</td>\n",
       "      <td>114325</td>\n",
       "      <td>285003</td>\n",
       "      <td>2813734</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>88831</td>\n",
       "      <td>-20582</td>\n",
       "      <td>17852</td>\n",
       "      <td>30835</td>\n",
       "      <td>-4934</td>\n",
       "      <td>112002</td>\n",
       "      <td>403395</td>\n",
       "      <td>2670050</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>105123</td>\n",
       "      <td>-12661</td>\n",
       "      <td>13005</td>\n",
       "      <td>62278</td>\n",
       "      <td>-6333</td>\n",
       "      <td>161412</td>\n",
       "      <td>733011</td>\n",
       "      <td>3503899</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>108283</td>\n",
       "      <td>-8970</td>\n",
       "      <td>10915</td>\n",
       "      <td>9407</td>\n",
       "      <td>-6039</td>\n",
       "      <td>113596</td>\n",
       "      <td>589161</td>\n",
       "      <td>3151101</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>108902</td>\n",
       "      <td>-13249</td>\n",
       "      <td>14942</td>\n",
       "      <td>7285</td>\n",
       "      <td>-3927</td>\n",
       "      <td>113953</td>\n",
       "      <td>499413</td>\n",
       "      <td>2710748</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>117356</td>\n",
       "      <td>2968</td>\n",
       "      <td>14106</td>\n",
       "      <td>16547</td>\n",
       "      <td>-6766</td>\n",
       "      <td>144211</td>\n",
       "      <td>370684</td>\n",
       "      <td>2376220</td>\n",
       "      <td>CU</td>\n",
       "      <td>PB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>122702</td>\n",
       "      <td>4711</td>\n",
       "      <td>43223</td>\n",
       "      <td>9613</td>\n",
       "      <td>-7862</td>\n",
       "      <td>172387</td>\n",
       "      <td>448219</td>\n",
       "      <td>2309153</td>\n",
       "      <td>CU</td>\n",
       "      <td>PB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>95481</td>\n",
       "      <td>2076</td>\n",
       "      <td>58858</td>\n",
       "      <td>25456</td>\n",
       "      <td>-6998</td>\n",
       "      <td>174873</td>\n",
       "      <td>296570</td>\n",
       "      <td>1953567</td>\n",
       "      <td>CU</td>\n",
       "      <td>PB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>97575</td>\n",
       "      <td>-11008</td>\n",
       "      <td>29155</td>\n",
       "      <td>62981</td>\n",
       "      <td>-5945</td>\n",
       "      <td>172758</td>\n",
       "      <td>193720</td>\n",
       "      <td>1810302</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>55962</td>\n",
       "      <td>-19987</td>\n",
       "      <td>31605</td>\n",
       "      <td>36422</td>\n",
       "      <td>-5442</td>\n",
       "      <td>98560</td>\n",
       "      <td>215054</td>\n",
       "      <td>1714688</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>40765</td>\n",
       "      <td>-6042</td>\n",
       "      <td>29528</td>\n",
       "      <td>23658</td>\n",
       "      <td>-7405</td>\n",
       "      <td>80504</td>\n",
       "      <td>246564</td>\n",
       "      <td>1949009</td>\n",
       "      <td>CU</td>\n",
       "      <td>PB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>45795</td>\n",
       "      <td>-35495</td>\n",
       "      <td>26980</td>\n",
       "      <td>68524</td>\n",
       "      <td>-7439</td>\n",
       "      <td>98365</td>\n",
       "      <td>304352</td>\n",
       "      <td>2261150</td>\n",
       "      <td>NI</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>44465</td>\n",
       "      <td>-51274</td>\n",
       "      <td>26642</td>\n",
       "      <td>75749</td>\n",
       "      <td>-7168</td>\n",
       "      <td>88414</td>\n",
       "      <td>371013</td>\n",
       "      <td>2364006</td>\n",
       "      <td>NI</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>68524</td>\n",
       "      <td>-53470</td>\n",
       "      <td>37682</td>\n",
       "      <td>85324</td>\n",
       "      <td>-6332</td>\n",
       "      <td>131728</td>\n",
       "      <td>317666</td>\n",
       "      <td>2309809</td>\n",
       "      <td>NI</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>70738</td>\n",
       "      <td>-50280</td>\n",
       "      <td>39961</td>\n",
       "      <td>70238</td>\n",
       "      <td>-7021</td>\n",
       "      <td>123636</td>\n",
       "      <td>154319</td>\n",
       "      <td>1818277</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>65393</td>\n",
       "      <td>-60088</td>\n",
       "      <td>61466</td>\n",
       "      <td>64222</td>\n",
       "      <td>-6136</td>\n",
       "      <td>124857</td>\n",
       "      <td>120192</td>\n",
       "      <td>1918854</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>122661</td>\n",
       "      <td>-70332</td>\n",
       "      <td>59709</td>\n",
       "      <td>56295</td>\n",
       "      <td>-5852</td>\n",
       "      <td>162481</td>\n",
       "      <td>456494</td>\n",
       "      <td>2883589</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>105643</td>\n",
       "      <td>-77188</td>\n",
       "      <td>102386</td>\n",
       "      <td>64054</td>\n",
       "      <td>-3813</td>\n",
       "      <td>191082</td>\n",
       "      <td>488702</td>\n",
       "      <td>2926557</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>142521</td>\n",
       "      <td>-68480</td>\n",
       "      <td>135419</td>\n",
       "      <td>47288</td>\n",
       "      <td>-2460</td>\n",
       "      <td>254288</td>\n",
       "      <td>691206</td>\n",
       "      <td>3528170</td>\n",
       "      <td>CU</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>141356</td>\n",
       "      <td>-94732</td>\n",
       "      <td>184841</td>\n",
       "      <td>52504</td>\n",
       "      <td>-2669</td>\n",
       "      <td>281300</td>\n",
       "      <td>612268</td>\n",
       "      <td>3427475</td>\n",
       "      <td>ZN</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>133267</td>\n",
       "      <td>-101198</td>\n",
       "      <td>183417</td>\n",
       "      <td>72297</td>\n",
       "      <td>-3531</td>\n",
       "      <td>284252</td>\n",
       "      <td>607290</td>\n",
       "      <td>3456647</td>\n",
       "      <td>ZN</td>\n",
       "      <td>AL</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety            CU      AL      ZN     NI     PB    有色板块     工业品     商品板块  \\\n",
       "date     会员简称                                                                  \n",
       "20200302 永安期货  293437  -35545  -83502   2587 -21443  155534  386111  2242503   \n",
       "20200303 永安期货  268912  -33230 -100258   5584 -20823  120185  403162  2321892   \n",
       "20200304 永安期货  300631  -47737 -104068  -6032 -20746  122048  548168  3081902   \n",
       "20200305 永安期货  302454  -44373 -122638  35046 -24006  146483  558203  3259601   \n",
       "20200306 永安期货  297077  -36945 -110007  17982 -22639  145468  478137  2988019   \n",
       "20200309 永安期货  209303  -36033 -109489  53050 -18229   98602  445132  2518960   \n",
       "20200310 永安期货  230728  -35925 -104777  82796 -16563  156259  664653  2953085   \n",
       "20200311 永安期货  205897  -32334  -98690  43197 -12078  105992  723774  3086349   \n",
       "20200312 永安期货  158144  -28419  -95501  37665 -14912   56977  581648  2449221   \n",
       "20200313 永安期货  187446  -21835  -85836  35668 -15540   99903  489821  2584952   \n",
       "20200316 永安期货  103878  -18772  -81656  38796  -7080   35166  412635  2870598   \n",
       "20200317 永安期货  128733  -28778 -106108  33435  -7458   19824  214572  2267793   \n",
       "20200318 永安期货  125625  -34869  -98108  10081   2277    5006  137680  2183291   \n",
       "20200319 永安期货  120572  -33387  -84413  19851  -4140   18483  262490  2622175   \n",
       "20200320 永安期货  128400  -46586  -62047  25421  -3708   41480  206366  2568459   \n",
       "20200323 永安期货   73148  -41816  -53148 -43864  -1084  -66764    4251  1996112   \n",
       "20200324 永安期货   65655  -40755  -28167 -17271  -1766  -22304  101255  2740776   \n",
       "20200325 永安期货   39933  -39440  -22541 -45458   -452  -67958   -1563  2364524   \n",
       "20200326 永安期货   29954  -39461  -32724 -36533    -47  -78811 -106656  1690348   \n",
       "20200327 永安期货   46076  -41927  -23838  -6974   5902  -20761 -147108  1607639   \n",
       "20200330 永安期货   54301  -39325  -20443 -14938   4727  -15678 -259374  1199832   \n",
       "20200331 永安期货   49788  -36368  -19987 -10084   3140  -13511 -299673   932421   \n",
       "20200401 永安期货   52895  -36825  -19051 -15557   1875  -16663 -513903   309687   \n",
       "20200402 永安期货   28309  -33086    3442 -23308   5306  -19337 -419471   546431   \n",
       "20200403 永安期货   55752  -35544   10359 -14217  -5217   11133 -325012   822433   \n",
       "20200407 永安期货   61597  -34209   33032  -4051  -4429   51940  -39788  1984305   \n",
       "20200408 永安期货   88641  -27187   36113  23362  -6604  114325  285003  2813734   \n",
       "20200409 永安期货   88831  -20582   17852  30835  -4934  112002  403395  2670050   \n",
       "20200410 永安期货  105123  -12661   13005  62278  -6333  161412  733011  3503899   \n",
       "20200413 永安期货  108283   -8970   10915   9407  -6039  113596  589161  3151101   \n",
       "20200414 永安期货  108902  -13249   14942   7285  -3927  113953  499413  2710748   \n",
       "20200415 永安期货  117356    2968   14106  16547  -6766  144211  370684  2376220   \n",
       "20200416 永安期货  122702    4711   43223   9613  -7862  172387  448219  2309153   \n",
       "20200417 永安期货   95481    2076   58858  25456  -6998  174873  296570  1953567   \n",
       "20200420 永安期货   97575  -11008   29155  62981  -5945  172758  193720  1810302   \n",
       "20200421 永安期货   55962  -19987   31605  36422  -5442   98560  215054  1714688   \n",
       "20200422 永安期货   40765   -6042   29528  23658  -7405   80504  246564  1949009   \n",
       "20200423 永安期货   45795  -35495   26980  68524  -7439   98365  304352  2261150   \n",
       "20200424 永安期货   44465  -51274   26642  75749  -7168   88414  371013  2364006   \n",
       "20200427 永安期货   68524  -53470   37682  85324  -6332  131728  317666  2309809   \n",
       "20200428 永安期货   70738  -50280   39961  70238  -7021  123636  154319  1818277   \n",
       "20200429 永安期货   65393  -60088   61466  64222  -6136  124857  120192  1918854   \n",
       "20200430 永安期货  122661  -70332   59709  56295  -5852  162481  456494  2883589   \n",
       "20200506 永安期货  105643  -77188  102386  64054  -3813  191082  488702  2926557   \n",
       "20200507 永安期货  142521  -68480  135419  47288  -2460  254288  691206  3528170   \n",
       "20200508 永安期货  141356  -94732  184841  52504  -2669  281300  612268  3427475   \n",
       "20200511 永安期货  133267 -101198  183417  72297  -3531  284252  607290  3456647   \n",
       "\n",
       "variety       max min  \n",
       "date     会员简称          \n",
       "20200302 永安期货  CU  ZN  \n",
       "20200303 永安期货  CU  ZN  \n",
       "20200304 永安期货  CU  ZN  \n",
       "20200305 永安期货  CU  ZN  \n",
       "20200306 永安期货  CU  ZN  \n",
       "20200309 永安期货  CU  ZN  \n",
       "20200310 永安期货  CU  ZN  \n",
       "20200311 永安期货  CU  ZN  \n",
       "20200312 永安期货  CU  ZN  \n",
       "20200313 永安期货  CU  ZN  \n",
       "20200316 永安期货  CU  ZN  \n",
       "20200317 永安期货  CU  ZN  \n",
       "20200318 永安期货  CU  ZN  \n",
       "20200319 永安期货  CU  ZN  \n",
       "20200320 永安期货  CU  ZN  \n",
       "20200323 永安期货  CU  ZN  \n",
       "20200324 永安期货  CU  AL  \n",
       "20200325 永安期货  CU  NI  \n",
       "20200326 永安期货  CU  AL  \n",
       "20200327 永安期货  CU  AL  \n",
       "20200330 永安期货  CU  AL  \n",
       "20200331 永安期货  CU  AL  \n",
       "20200401 永安期货  CU  AL  \n",
       "20200402 永安期货  CU  AL  \n",
       "20200403 永安期货  CU  AL  \n",
       "20200407 永安期货  CU  AL  \n",
       "20200408 永安期货  CU  AL  \n",
       "20200409 永安期货  CU  AL  \n",
       "20200410 永安期货  CU  AL  \n",
       "20200413 永安期货  CU  AL  \n",
       "20200414 永安期货  CU  AL  \n",
       "20200415 永安期货  CU  PB  \n",
       "20200416 永安期货  CU  PB  \n",
       "20200417 永安期货  CU  PB  \n",
       "20200420 永安期货  CU  AL  \n",
       "20200421 永安期货  CU  AL  \n",
       "20200422 永安期货  CU  PB  \n",
       "20200423 永安期货  NI  AL  \n",
       "20200424 永安期货  NI  AL  \n",
       "20200427 永安期货  NI  AL  \n",
       "20200428 永安期货  CU  AL  \n",
       "20200429 永安期货  CU  AL  \n",
       "20200430 永安期货  CU  AL  \n",
       "20200506 永安期货  CU  AL  \n",
       "20200507 永安期货  CU  AL  \n",
       "20200508 永安期货  ZN  AL  \n",
       "20200511 永安期货  ZN  AL  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "有色=sz.copy()\n",
    "有色=有色[['CU','AL','ZN','NI','PB','有色板块','工业品','商品板块']]\n",
    "有色['max']=有色[['CU','AL','ZN','NI','PB']].idxmax(axis=1) \n",
    "有色['min']=有色[['CU','AL','ZN','NI','PB']].idxmin(axis=1)\n",
    "有色['20200213':]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>A</th>\n",
       "      <th>C</th>\n",
       "      <th>M</th>\n",
       "      <th>RM</th>\n",
       "      <th>Y</th>\n",
       "      <th>P</th>\n",
       "      <th>OI</th>\n",
       "      <th>CF</th>\n",
       "      <th>SR</th>\n",
       "      <th>JD</th>\n",
       "      <th>CS</th>\n",
       "      <th>AP</th>\n",
       "      <th>农产品</th>\n",
       "      <th>max</th>\n",
       "      <th>min</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>24840</td>\n",
       "      <td>148196</td>\n",
       "      <td>109198</td>\n",
       "      <td>-7693</td>\n",
       "      <td>92120</td>\n",
       "      <td>12233</td>\n",
       "      <td>32881</td>\n",
       "      <td>192062</td>\n",
       "      <td>2947</td>\n",
       "      <td>-25418</td>\n",
       "      <td>1132</td>\n",
       "      <td>-28749</td>\n",
       "      <td>553749</td>\n",
       "      <td>CF</td>\n",
       "      <td>AP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>22799</td>\n",
       "      <td>147700</td>\n",
       "      <td>134436</td>\n",
       "      <td>-14064</td>\n",
       "      <td>80683</td>\n",
       "      <td>20454</td>\n",
       "      <td>27793</td>\n",
       "      <td>176814</td>\n",
       "      <td>-1066</td>\n",
       "      <td>-31185</td>\n",
       "      <td>-544</td>\n",
       "      <td>-26387</td>\n",
       "      <td>537433</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>22816</td>\n",
       "      <td>149765</td>\n",
       "      <td>134206</td>\n",
       "      <td>-15096</td>\n",
       "      <td>83854</td>\n",
       "      <td>32231</td>\n",
       "      <td>37725</td>\n",
       "      <td>184120</td>\n",
       "      <td>2017</td>\n",
       "      <td>-32387</td>\n",
       "      <td>-918</td>\n",
       "      <td>-27602</td>\n",
       "      <td>570731</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>20202</td>\n",
       "      <td>149181</td>\n",
       "      <td>155769</td>\n",
       "      <td>-17735</td>\n",
       "      <td>108578</td>\n",
       "      <td>18485</td>\n",
       "      <td>35972</td>\n",
       "      <td>188796</td>\n",
       "      <td>14046</td>\n",
       "      <td>-34705</td>\n",
       "      <td>-3031</td>\n",
       "      <td>-26839</td>\n",
       "      <td>608719</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>19734</td>\n",
       "      <td>149998</td>\n",
       "      <td>158863</td>\n",
       "      <td>-20643</td>\n",
       "      <td>105115</td>\n",
       "      <td>-4783</td>\n",
       "      <td>35807</td>\n",
       "      <td>174411</td>\n",
       "      <td>16191</td>\n",
       "      <td>-35424</td>\n",
       "      <td>-585</td>\n",
       "      <td>-27401</td>\n",
       "      <td>571283</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>28118</td>\n",
       "      <td>158794</td>\n",
       "      <td>179674</td>\n",
       "      <td>18964</td>\n",
       "      <td>98543</td>\n",
       "      <td>-23439</td>\n",
       "      <td>33611</td>\n",
       "      <td>179826</td>\n",
       "      <td>-25507</td>\n",
       "      <td>-33593</td>\n",
       "      <td>128</td>\n",
       "      <td>-17683</td>\n",
       "      <td>597436</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>29961</td>\n",
       "      <td>113889</td>\n",
       "      <td>162385</td>\n",
       "      <td>13586</td>\n",
       "      <td>93423</td>\n",
       "      <td>-16580</td>\n",
       "      <td>28903</td>\n",
       "      <td>131056</td>\n",
       "      <td>-28524</td>\n",
       "      <td>-31909</td>\n",
       "      <td>-1277</td>\n",
       "      <td>-15107</td>\n",
       "      <td>479806</td>\n",
       "      <td>M</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>26116</td>\n",
       "      <td>83605</td>\n",
       "      <td>158968</td>\n",
       "      <td>22912</td>\n",
       "      <td>96851</td>\n",
       "      <td>-19569</td>\n",
       "      <td>18754</td>\n",
       "      <td>136742</td>\n",
       "      <td>-31041</td>\n",
       "      <td>-25070</td>\n",
       "      <td>-4747</td>\n",
       "      <td>-19191</td>\n",
       "      <td>444330</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>25897</td>\n",
       "      <td>86094</td>\n",
       "      <td>164614</td>\n",
       "      <td>22990</td>\n",
       "      <td>64618</td>\n",
       "      <td>-5036</td>\n",
       "      <td>29477</td>\n",
       "      <td>184100</td>\n",
       "      <td>-37061</td>\n",
       "      <td>-21821</td>\n",
       "      <td>-7559</td>\n",
       "      <td>-18745</td>\n",
       "      <td>487568</td>\n",
       "      <td>CF</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>26648</td>\n",
       "      <td>84762</td>\n",
       "      <td>194291</td>\n",
       "      <td>17168</td>\n",
       "      <td>79860</td>\n",
       "      <td>2423</td>\n",
       "      <td>19824</td>\n",
       "      <td>197690</td>\n",
       "      <td>-7758</td>\n",
       "      <td>-21357</td>\n",
       "      <td>-16489</td>\n",
       "      <td>-15415</td>\n",
       "      <td>561647</td>\n",
       "      <td>CF</td>\n",
       "      <td>JD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>22336</td>\n",
       "      <td>88917</td>\n",
       "      <td>227021</td>\n",
       "      <td>15067</td>\n",
       "      <td>69298</td>\n",
       "      <td>9750</td>\n",
       "      <td>17718</td>\n",
       "      <td>207338</td>\n",
       "      <td>-32197</td>\n",
       "      <td>-19930</td>\n",
       "      <td>-9990</td>\n",
       "      <td>-7060</td>\n",
       "      <td>588268</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>20229</td>\n",
       "      <td>86097</td>\n",
       "      <td>181981</td>\n",
       "      <td>28869</td>\n",
       "      <td>57193</td>\n",
       "      <td>37974</td>\n",
       "      <td>6095</td>\n",
       "      <td>227696</td>\n",
       "      <td>-37373</td>\n",
       "      <td>-18643</td>\n",
       "      <td>-11328</td>\n",
       "      <td>-9257</td>\n",
       "      <td>569533</td>\n",
       "      <td>CF</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>10613</td>\n",
       "      <td>100012</td>\n",
       "      <td>158576</td>\n",
       "      <td>29002</td>\n",
       "      <td>59691</td>\n",
       "      <td>100884</td>\n",
       "      <td>15225</td>\n",
       "      <td>212401</td>\n",
       "      <td>-46372</td>\n",
       "      <td>-16422</td>\n",
       "      <td>-11966</td>\n",
       "      <td>-11104</td>\n",
       "      <td>600540</td>\n",
       "      <td>CF</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>4872</td>\n",
       "      <td>114248</td>\n",
       "      <td>196999</td>\n",
       "      <td>27863</td>\n",
       "      <td>54186</td>\n",
       "      <td>126157</td>\n",
       "      <td>13389</td>\n",
       "      <td>182245</td>\n",
       "      <td>-39125</td>\n",
       "      <td>-15993</td>\n",
       "      <td>-13402</td>\n",
       "      <td>-6227</td>\n",
       "      <td>645212</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>9436</td>\n",
       "      <td>97855</td>\n",
       "      <td>209547</td>\n",
       "      <td>28839</td>\n",
       "      <td>58042</td>\n",
       "      <td>102493</td>\n",
       "      <td>14927</td>\n",
       "      <td>189790</td>\n",
       "      <td>-43586</td>\n",
       "      <td>-14630</td>\n",
       "      <td>-14989</td>\n",
       "      <td>-2072</td>\n",
       "      <td>635652</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>6738</td>\n",
       "      <td>23694</td>\n",
       "      <td>217533</td>\n",
       "      <td>32268</td>\n",
       "      <td>114282</td>\n",
       "      <td>66056</td>\n",
       "      <td>9493</td>\n",
       "      <td>169498</td>\n",
       "      <td>-45010</td>\n",
       "      <td>-16317</td>\n",
       "      <td>-15187</td>\n",
       "      <td>-6976</td>\n",
       "      <td>556072</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3475</td>\n",
       "      <td>51965</td>\n",
       "      <td>263696</td>\n",
       "      <td>26630</td>\n",
       "      <td>125302</td>\n",
       "      <td>113942</td>\n",
       "      <td>5143</td>\n",
       "      <td>207919</td>\n",
       "      <td>-45791</td>\n",
       "      <td>-15364</td>\n",
       "      <td>-15953</td>\n",
       "      <td>-3655</td>\n",
       "      <td>717309</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>309</td>\n",
       "      <td>55419</td>\n",
       "      <td>236629</td>\n",
       "      <td>4438</td>\n",
       "      <td>158921</td>\n",
       "      <td>116878</td>\n",
       "      <td>-3526</td>\n",
       "      <td>192176</td>\n",
       "      <td>-62882</td>\n",
       "      <td>-16200</td>\n",
       "      <td>-17346</td>\n",
       "      <td>-4658</td>\n",
       "      <td>660158</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-7457</td>\n",
       "      <td>51960</td>\n",
       "      <td>197998</td>\n",
       "      <td>14431</td>\n",
       "      <td>124888</td>\n",
       "      <td>70317</td>\n",
       "      <td>-3248</td>\n",
       "      <td>177102</td>\n",
       "      <td>-59103</td>\n",
       "      <td>-20646</td>\n",
       "      <td>-13862</td>\n",
       "      <td>-6059</td>\n",
       "      <td>526321</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-15230</td>\n",
       "      <td>53778</td>\n",
       "      <td>212908</td>\n",
       "      <td>7969</td>\n",
       "      <td>129895</td>\n",
       "      <td>29587</td>\n",
       "      <td>33789</td>\n",
       "      <td>176337</td>\n",
       "      <td>-57092</td>\n",
       "      <td>-20890</td>\n",
       "      <td>-10014</td>\n",
       "      <td>-5646</td>\n",
       "      <td>535391</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-22133</td>\n",
       "      <td>-695</td>\n",
       "      <td>241054</td>\n",
       "      <td>12862</td>\n",
       "      <td>117694</td>\n",
       "      <td>18013</td>\n",
       "      <td>44227</td>\n",
       "      <td>179823</td>\n",
       "      <td>-59591</td>\n",
       "      <td>-27434</td>\n",
       "      <td>-5362</td>\n",
       "      <td>-6299</td>\n",
       "      <td>492159</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-27910</td>\n",
       "      <td>-10314</td>\n",
       "      <td>227197</td>\n",
       "      <td>17511</td>\n",
       "      <td>101559</td>\n",
       "      <td>-1397</td>\n",
       "      <td>46452</td>\n",
       "      <td>184142</td>\n",
       "      <td>-60315</td>\n",
       "      <td>-24198</td>\n",
       "      <td>-4522</td>\n",
       "      <td>-7450</td>\n",
       "      <td>440755</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-21258</td>\n",
       "      <td>-11925</td>\n",
       "      <td>228078</td>\n",
       "      <td>11582</td>\n",
       "      <td>103435</td>\n",
       "      <td>29202</td>\n",
       "      <td>56382</td>\n",
       "      <td>155923</td>\n",
       "      <td>-65943</td>\n",
       "      <td>-24579</td>\n",
       "      <td>-4366</td>\n",
       "      <td>-7717</td>\n",
       "      <td>448814</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-16398</td>\n",
       "      <td>4170</td>\n",
       "      <td>218428</td>\n",
       "      <td>2616</td>\n",
       "      <td>99357</td>\n",
       "      <td>7224</td>\n",
       "      <td>47069</td>\n",
       "      <td>143634</td>\n",
       "      <td>-79911</td>\n",
       "      <td>-20226</td>\n",
       "      <td>-5185</td>\n",
       "      <td>-8773</td>\n",
       "      <td>392005</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-14293</td>\n",
       "      <td>2004</td>\n",
       "      <td>199819</td>\n",
       "      <td>747</td>\n",
       "      <td>96973</td>\n",
       "      <td>11146</td>\n",
       "      <td>51659</td>\n",
       "      <td>138732</td>\n",
       "      <td>-57182</td>\n",
       "      <td>-18373</td>\n",
       "      <td>-16346</td>\n",
       "      <td>-7150</td>\n",
       "      <td>387736</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13239</td>\n",
       "      <td>8608</td>\n",
       "      <td>235296</td>\n",
       "      <td>8954</td>\n",
       "      <td>80199</td>\n",
       "      <td>14644</td>\n",
       "      <td>60119</td>\n",
       "      <td>145400</td>\n",
       "      <td>-60944</td>\n",
       "      <td>-10094</td>\n",
       "      <td>-11798</td>\n",
       "      <td>-14212</td>\n",
       "      <td>442933</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-1656</td>\n",
       "      <td>9403</td>\n",
       "      <td>285423</td>\n",
       "      <td>23019</td>\n",
       "      <td>104305</td>\n",
       "      <td>7797</td>\n",
       "      <td>2761</td>\n",
       "      <td>110577</td>\n",
       "      <td>-61647</td>\n",
       "      <td>-10466</td>\n",
       "      <td>-13885</td>\n",
       "      <td>-13989</td>\n",
       "      <td>441642</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>275</td>\n",
       "      <td>-14617</td>\n",
       "      <td>253493</td>\n",
       "      <td>14184</td>\n",
       "      <td>92057</td>\n",
       "      <td>7240</td>\n",
       "      <td>4776</td>\n",
       "      <td>41732</td>\n",
       "      <td>-78381</td>\n",
       "      <td>-10448</td>\n",
       "      <td>-16150</td>\n",
       "      <td>-13859</td>\n",
       "      <td>280302</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-2807</td>\n",
       "      <td>-7198</td>\n",
       "      <td>246788</td>\n",
       "      <td>12766</td>\n",
       "      <td>87369</td>\n",
       "      <td>-21954</td>\n",
       "      <td>5417</td>\n",
       "      <td>56052</td>\n",
       "      <td>-85769</td>\n",
       "      <td>-15575</td>\n",
       "      <td>-14024</td>\n",
       "      <td>-13623</td>\n",
       "      <td>247442</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1265</td>\n",
       "      <td>-21005</td>\n",
       "      <td>249582</td>\n",
       "      <td>11037</td>\n",
       "      <td>113218</td>\n",
       "      <td>9688</td>\n",
       "      <td>3386</td>\n",
       "      <td>51791</td>\n",
       "      <td>-93190</td>\n",
       "      <td>628</td>\n",
       "      <td>-13212</td>\n",
       "      <td>-10151</td>\n",
       "      <td>303037</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-1990</td>\n",
       "      <td>-39280</td>\n",
       "      <td>266247</td>\n",
       "      <td>13142</td>\n",
       "      <td>97262</td>\n",
       "      <td>-11516</td>\n",
       "      <td>4598</td>\n",
       "      <td>32792</td>\n",
       "      <td>-100436</td>\n",
       "      <td>2799</td>\n",
       "      <td>-13385</td>\n",
       "      <td>-11295</td>\n",
       "      <td>238938</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-5859</td>\n",
       "      <td>-36527</td>\n",
       "      <td>274954</td>\n",
       "      <td>26435</td>\n",
       "      <td>99423</td>\n",
       "      <td>2702</td>\n",
       "      <td>3809</td>\n",
       "      <td>29915</td>\n",
       "      <td>-120888</td>\n",
       "      <td>2836</td>\n",
       "      <td>-13263</td>\n",
       "      <td>-12916</td>\n",
       "      <td>250621</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2456</td>\n",
       "      <td>-37520</td>\n",
       "      <td>279235</td>\n",
       "      <td>14993</td>\n",
       "      <td>37735</td>\n",
       "      <td>-9608</td>\n",
       "      <td>6681</td>\n",
       "      <td>45695</td>\n",
       "      <td>-122114</td>\n",
       "      <td>3791</td>\n",
       "      <td>-13860</td>\n",
       "      <td>-14392</td>\n",
       "      <td>193092</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>118</td>\n",
       "      <td>-32325</td>\n",
       "      <td>286040</td>\n",
       "      <td>13594</td>\n",
       "      <td>26426</td>\n",
       "      <td>-17545</td>\n",
       "      <td>2063</td>\n",
       "      <td>39716</td>\n",
       "      <td>-124958</td>\n",
       "      <td>2813</td>\n",
       "      <td>-13188</td>\n",
       "      <td>-14788</td>\n",
       "      <td>167966</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-1747</td>\n",
       "      <td>20848</td>\n",
       "      <td>239087</td>\n",
       "      <td>11957</td>\n",
       "      <td>20481</td>\n",
       "      <td>-13376</td>\n",
       "      <td>2406</td>\n",
       "      <td>66324</td>\n",
       "      <td>-119298</td>\n",
       "      <td>6690</td>\n",
       "      <td>-15292</td>\n",
       "      <td>-12289</td>\n",
       "      <td>205791</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-1147</td>\n",
       "      <td>24441</td>\n",
       "      <td>246699</td>\n",
       "      <td>12875</td>\n",
       "      <td>-4180</td>\n",
       "      <td>-47778</td>\n",
       "      <td>4398</td>\n",
       "      <td>54101</td>\n",
       "      <td>-111579</td>\n",
       "      <td>6304</td>\n",
       "      <td>-16487</td>\n",
       "      <td>-10870</td>\n",
       "      <td>156777</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-8203</td>\n",
       "      <td>17779</td>\n",
       "      <td>287534</td>\n",
       "      <td>27326</td>\n",
       "      <td>-9221</td>\n",
       "      <td>-20385</td>\n",
       "      <td>4748</td>\n",
       "      <td>74435</td>\n",
       "      <td>-124751</td>\n",
       "      <td>6148</td>\n",
       "      <td>-17756</td>\n",
       "      <td>-6336</td>\n",
       "      <td>231318</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-6163</td>\n",
       "      <td>18585</td>\n",
       "      <td>289143</td>\n",
       "      <td>36460</td>\n",
       "      <td>46073</td>\n",
       "      <td>-21350</td>\n",
       "      <td>6789</td>\n",
       "      <td>40191</td>\n",
       "      <td>-124712</td>\n",
       "      <td>3723</td>\n",
       "      <td>-24181</td>\n",
       "      <td>-10280</td>\n",
       "      <td>254278</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-6936</td>\n",
       "      <td>23065</td>\n",
       "      <td>279501</td>\n",
       "      <td>36432</td>\n",
       "      <td>50477</td>\n",
       "      <td>-57765</td>\n",
       "      <td>9508</td>\n",
       "      <td>62098</td>\n",
       "      <td>-116810</td>\n",
       "      <td>3143</td>\n",
       "      <td>-24506</td>\n",
       "      <td>-3199</td>\n",
       "      <td>255008</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-7020</td>\n",
       "      <td>-18723</td>\n",
       "      <td>265127</td>\n",
       "      <td>44869</td>\n",
       "      <td>58109</td>\n",
       "      <td>-55344</td>\n",
       "      <td>10480</td>\n",
       "      <td>61742</td>\n",
       "      <td>-107167</td>\n",
       "      <td>2525</td>\n",
       "      <td>-22566</td>\n",
       "      <td>-4265</td>\n",
       "      <td>227767</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-8768</td>\n",
       "      <td>5774</td>\n",
       "      <td>257715</td>\n",
       "      <td>34172</td>\n",
       "      <td>57930</td>\n",
       "      <td>-39547</td>\n",
       "      <td>7074</td>\n",
       "      <td>9379</td>\n",
       "      <td>-98744</td>\n",
       "      <td>4081</td>\n",
       "      <td>-21209</td>\n",
       "      <td>-3510</td>\n",
       "      <td>204347</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-11127</td>\n",
       "      <td>-14591</td>\n",
       "      <td>250630</td>\n",
       "      <td>25382</td>\n",
       "      <td>32478</td>\n",
       "      <td>17038</td>\n",
       "      <td>8090</td>\n",
       "      <td>72287</td>\n",
       "      <td>-114913</td>\n",
       "      <td>5326</td>\n",
       "      <td>-19414</td>\n",
       "      <td>-6497</td>\n",
       "      <td>244689</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-8533</td>\n",
       "      <td>-38131</td>\n",
       "      <td>208330</td>\n",
       "      <td>26367</td>\n",
       "      <td>31697</td>\n",
       "      <td>42535</td>\n",
       "      <td>7935</td>\n",
       "      <td>59852</td>\n",
       "      <td>-109931</td>\n",
       "      <td>5586</td>\n",
       "      <td>-8446</td>\n",
       "      <td>-6103</td>\n",
       "      <td>211158</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-9675</td>\n",
       "      <td>-11237</td>\n",
       "      <td>218352</td>\n",
       "      <td>21799</td>\n",
       "      <td>40745</td>\n",
       "      <td>29462</td>\n",
       "      <td>12562</td>\n",
       "      <td>1974</td>\n",
       "      <td>-130150</td>\n",
       "      <td>7776</td>\n",
       "      <td>-11977</td>\n",
       "      <td>-8403</td>\n",
       "      <td>161228</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-12866</td>\n",
       "      <td>9673</td>\n",
       "      <td>212814</td>\n",
       "      <td>23550</td>\n",
       "      <td>52299</td>\n",
       "      <td>-26472</td>\n",
       "      <td>19769</td>\n",
       "      <td>46147</td>\n",
       "      <td>-137483</td>\n",
       "      <td>4623</td>\n",
       "      <td>-7902</td>\n",
       "      <td>-11782</td>\n",
       "      <td>172370</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-13431</td>\n",
       "      <td>19143</td>\n",
       "      <td>214665</td>\n",
       "      <td>23682</td>\n",
       "      <td>48244</td>\n",
       "      <td>-3329</td>\n",
       "      <td>16624</td>\n",
       "      <td>105700</td>\n",
       "      <td>-160353</td>\n",
       "      <td>4452</td>\n",
       "      <td>-5139</td>\n",
       "      <td>-12453</td>\n",
       "      <td>237805</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>-3655</td>\n",
       "      <td>24619</td>\n",
       "      <td>209183</td>\n",
       "      <td>23442</td>\n",
       "      <td>60226</td>\n",
       "      <td>3096</td>\n",
       "      <td>20776</td>\n",
       "      <td>128692</td>\n",
       "      <td>-159040</td>\n",
       "      <td>0</td>\n",
       "      <td>-4122</td>\n",
       "      <td>-12544</td>\n",
       "      <td>290673</td>\n",
       "      <td>M</td>\n",
       "      <td>SR</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety            A       C       M     RM       Y       P     OI      CF  \\\n",
       "date     会员简称                                                                \n",
       "20200302 永安期货  24840  148196  109198  -7693   92120   12233  32881  192062   \n",
       "20200303 永安期货  22799  147700  134436 -14064   80683   20454  27793  176814   \n",
       "20200304 永安期货  22816  149765  134206 -15096   83854   32231  37725  184120   \n",
       "20200305 永安期货  20202  149181  155769 -17735  108578   18485  35972  188796   \n",
       "20200306 永安期货  19734  149998  158863 -20643  105115   -4783  35807  174411   \n",
       "20200309 永安期货  28118  158794  179674  18964   98543  -23439  33611  179826   \n",
       "20200310 永安期货  29961  113889  162385  13586   93423  -16580  28903  131056   \n",
       "20200311 永安期货  26116   83605  158968  22912   96851  -19569  18754  136742   \n",
       "20200312 永安期货  25897   86094  164614  22990   64618   -5036  29477  184100   \n",
       "20200313 永安期货  26648   84762  194291  17168   79860    2423  19824  197690   \n",
       "20200316 永安期货  22336   88917  227021  15067   69298    9750  17718  207338   \n",
       "20200317 永安期货  20229   86097  181981  28869   57193   37974   6095  227696   \n",
       "20200318 永安期货  10613  100012  158576  29002   59691  100884  15225  212401   \n",
       "20200319 永安期货   4872  114248  196999  27863   54186  126157  13389  182245   \n",
       "20200320 永安期货   9436   97855  209547  28839   58042  102493  14927  189790   \n",
       "20200323 永安期货   6738   23694  217533  32268  114282   66056   9493  169498   \n",
       "20200324 永安期货   3475   51965  263696  26630  125302  113942   5143  207919   \n",
       "20200325 永安期货    309   55419  236629   4438  158921  116878  -3526  192176   \n",
       "20200326 永安期货  -7457   51960  197998  14431  124888   70317  -3248  177102   \n",
       "20200327 永安期货 -15230   53778  212908   7969  129895   29587  33789  176337   \n",
       "20200330 永安期货 -22133    -695  241054  12862  117694   18013  44227  179823   \n",
       "20200331 永安期货 -27910  -10314  227197  17511  101559   -1397  46452  184142   \n",
       "20200401 永安期货 -21258  -11925  228078  11582  103435   29202  56382  155923   \n",
       "20200402 永安期货 -16398    4170  218428   2616   99357    7224  47069  143634   \n",
       "20200403 永安期货 -14293    2004  199819    747   96973   11146  51659  138732   \n",
       "20200407 永安期货 -13239    8608  235296   8954   80199   14644  60119  145400   \n",
       "20200408 永安期货  -1656    9403  285423  23019  104305    7797   2761  110577   \n",
       "20200409 永安期货    275  -14617  253493  14184   92057    7240   4776   41732   \n",
       "20200410 永安期货  -2807   -7198  246788  12766   87369  -21954   5417   56052   \n",
       "20200413 永安期货   1265  -21005  249582  11037  113218    9688   3386   51791   \n",
       "20200414 永安期货  -1990  -39280  266247  13142   97262  -11516   4598   32792   \n",
       "20200415 永安期货  -5859  -36527  274954  26435   99423    2702   3809   29915   \n",
       "20200416 永安期货   2456  -37520  279235  14993   37735   -9608   6681   45695   \n",
       "20200417 永安期货    118  -32325  286040  13594   26426  -17545   2063   39716   \n",
       "20200420 永安期货  -1747   20848  239087  11957   20481  -13376   2406   66324   \n",
       "20200421 永安期货  -1147   24441  246699  12875   -4180  -47778   4398   54101   \n",
       "20200422 永安期货  -8203   17779  287534  27326   -9221  -20385   4748   74435   \n",
       "20200423 永安期货  -6163   18585  289143  36460   46073  -21350   6789   40191   \n",
       "20200424 永安期货  -6936   23065  279501  36432   50477  -57765   9508   62098   \n",
       "20200427 永安期货  -7020  -18723  265127  44869   58109  -55344  10480   61742   \n",
       "20200428 永安期货  -8768    5774  257715  34172   57930  -39547   7074    9379   \n",
       "20200429 永安期货 -11127  -14591  250630  25382   32478   17038   8090   72287   \n",
       "20200430 永安期货  -8533  -38131  208330  26367   31697   42535   7935   59852   \n",
       "20200506 永安期货  -9675  -11237  218352  21799   40745   29462  12562    1974   \n",
       "20200507 永安期货 -12866    9673  212814  23550   52299  -26472  19769   46147   \n",
       "20200508 永安期货 -13431   19143  214665  23682   48244   -3329  16624  105700   \n",
       "20200511 永安期货  -3655   24619  209183  23442   60226    3096  20776  128692   \n",
       "\n",
       "variety            SR     JD     CS     AP     农产品 max min  \n",
       "date     会员简称                                               \n",
       "20200302 永安期货    2947 -25418   1132 -28749  553749  CF  AP  \n",
       "20200303 永安期货   -1066 -31185   -544 -26387  537433  CF  JD  \n",
       "20200304 永安期货    2017 -32387   -918 -27602  570731  CF  JD  \n",
       "20200305 永安期货   14046 -34705  -3031 -26839  608719  CF  JD  \n",
       "20200306 永安期货   16191 -35424   -585 -27401  571283  CF  JD  \n",
       "20200309 永安期货  -25507 -33593    128 -17683  597436  CF  JD  \n",
       "20200310 永安期货  -28524 -31909  -1277 -15107  479806   M  JD  \n",
       "20200311 永安期货  -31041 -25070  -4747 -19191  444330   M  SR  \n",
       "20200312 永安期货  -37061 -21821  -7559 -18745  487568  CF  SR  \n",
       "20200313 永安期货   -7758 -21357 -16489 -15415  561647  CF  JD  \n",
       "20200316 永安期货  -32197 -19930  -9990  -7060  588268   M  SR  \n",
       "20200317 永安期货  -37373 -18643 -11328  -9257  569533  CF  SR  \n",
       "20200318 永安期货  -46372 -16422 -11966 -11104  600540  CF  SR  \n",
       "20200319 永安期货  -39125 -15993 -13402  -6227  645212   M  SR  \n",
       "20200320 永安期货  -43586 -14630 -14989  -2072  635652   M  SR  \n",
       "20200323 永安期货  -45010 -16317 -15187  -6976  556072   M  SR  \n",
       "20200324 永安期货  -45791 -15364 -15953  -3655  717309   M  SR  \n",
       "20200325 永安期货  -62882 -16200 -17346  -4658  660158   M  SR  \n",
       "20200326 永安期货  -59103 -20646 -13862  -6059  526321   M  SR  \n",
       "20200327 永安期货  -57092 -20890 -10014  -5646  535391   M  SR  \n",
       "20200330 永安期货  -59591 -27434  -5362  -6299  492159   M  SR  \n",
       "20200331 永安期货  -60315 -24198  -4522  -7450  440755   M  SR  \n",
       "20200401 永安期货  -65943 -24579  -4366  -7717  448814   M  SR  \n",
       "20200402 永安期货  -79911 -20226  -5185  -8773  392005   M  SR  \n",
       "20200403 永安期货  -57182 -18373 -16346  -7150  387736   M  SR  \n",
       "20200407 永安期货  -60944 -10094 -11798 -14212  442933   M  SR  \n",
       "20200408 永安期货  -61647 -10466 -13885 -13989  441642   M  SR  \n",
       "20200409 永安期货  -78381 -10448 -16150 -13859  280302   M  SR  \n",
       "20200410 永安期货  -85769 -15575 -14024 -13623  247442   M  SR  \n",
       "20200413 永安期货  -93190    628 -13212 -10151  303037   M  SR  \n",
       "20200414 永安期货 -100436   2799 -13385 -11295  238938   M  SR  \n",
       "20200415 永安期货 -120888   2836 -13263 -12916  250621   M  SR  \n",
       "20200416 永安期货 -122114   3791 -13860 -14392  193092   M  SR  \n",
       "20200417 永安期货 -124958   2813 -13188 -14788  167966   M  SR  \n",
       "20200420 永安期货 -119298   6690 -15292 -12289  205791   M  SR  \n",
       "20200421 永安期货 -111579   6304 -16487 -10870  156777   M  SR  \n",
       "20200422 永安期货 -124751   6148 -17756  -6336  231318   M  SR  \n",
       "20200423 永安期货 -124712   3723 -24181 -10280  254278   M  SR  \n",
       "20200424 永安期货 -116810   3143 -24506  -3199  255008   M  SR  \n",
       "20200427 永安期货 -107167   2525 -22566  -4265  227767   M  SR  \n",
       "20200428 永安期货  -98744   4081 -21209  -3510  204347   M  SR  \n",
       "20200429 永安期货 -114913   5326 -19414  -6497  244689   M  SR  \n",
       "20200430 永安期货 -109931   5586  -8446  -6103  211158   M  SR  \n",
       "20200506 永安期货 -130150   7776 -11977  -8403  161228   M  SR  \n",
       "20200507 永安期货 -137483   4623  -7902 -11782  172370   M  SR  \n",
       "20200508 永安期货 -160353   4452  -5139 -12453  237805   M  SR  \n",
       "20200511 永安期货 -159040      0  -4122 -12544  290673   M  SR  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "农产品=sz.copy()\n",
    "农产品=农产品[['A','C','M','RM','Y','P','OI','CF','SR','JD','CS','AP','农产品']]\n",
    "农产品['max']=农产品[['A','C','M','RM','Y','P','OI','CF','SR','JD','CS','AP']].idxmax(axis=1) \n",
    "农产品['min']=农产品[['A','C','M','RM','Y','P','OI','CF','SR','JD','CS','AP']].idxmin(axis=1)\n",
    "农产品['20200213':]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>variety</th>\n",
       "      <th>商品板块</th>\n",
       "      <th>工业品</th>\n",
       "      <th>化工板块</th>\n",
       "      <th>黑色板块</th>\n",
       "      <th>有色板块</th>\n",
       "      <th>农产品</th>\n",
       "      <th>油脂板块</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th>会员简称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>20200302</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2242503</td>\n",
       "      <td>386111</td>\n",
       "      <td>155564</td>\n",
       "      <td>9854</td>\n",
       "      <td>155534</td>\n",
       "      <td>553749</td>\n",
       "      <td>137234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200303</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2321892</td>\n",
       "      <td>403162</td>\n",
       "      <td>175000</td>\n",
       "      <td>43168</td>\n",
       "      <td>120185</td>\n",
       "      <td>537433</td>\n",
       "      <td>128930</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200304</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3081902</td>\n",
       "      <td>548168</td>\n",
       "      <td>172859</td>\n",
       "      <td>185478</td>\n",
       "      <td>122048</td>\n",
       "      <td>570731</td>\n",
       "      <td>153810</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200305</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3259601</td>\n",
       "      <td>558203</td>\n",
       "      <td>122198</td>\n",
       "      <td>222118</td>\n",
       "      <td>146483</td>\n",
       "      <td>608719</td>\n",
       "      <td>163035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200306</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2988019</td>\n",
       "      <td>478137</td>\n",
       "      <td>128105</td>\n",
       "      <td>134002</td>\n",
       "      <td>145468</td>\n",
       "      <td>571283</td>\n",
       "      <td>136139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200309</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2518960</td>\n",
       "      <td>445132</td>\n",
       "      <td>129510</td>\n",
       "      <td>137423</td>\n",
       "      <td>98602</td>\n",
       "      <td>597436</td>\n",
       "      <td>108715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200310</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2953085</td>\n",
       "      <td>664653</td>\n",
       "      <td>123768</td>\n",
       "      <td>321145</td>\n",
       "      <td>156259</td>\n",
       "      <td>479806</td>\n",
       "      <td>105746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200311</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3086349</td>\n",
       "      <td>723774</td>\n",
       "      <td>133344</td>\n",
       "      <td>439635</td>\n",
       "      <td>105992</td>\n",
       "      <td>444330</td>\n",
       "      <td>96036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200312</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2449221</td>\n",
       "      <td>581648</td>\n",
       "      <td>85941</td>\n",
       "      <td>410367</td>\n",
       "      <td>56977</td>\n",
       "      <td>487568</td>\n",
       "      <td>89059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200313</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2584952</td>\n",
       "      <td>489821</td>\n",
       "      <td>58306</td>\n",
       "      <td>318745</td>\n",
       "      <td>99903</td>\n",
       "      <td>561647</td>\n",
       "      <td>102107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200316</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2870598</td>\n",
       "      <td>412635</td>\n",
       "      <td>17640</td>\n",
       "      <td>355979</td>\n",
       "      <td>35166</td>\n",
       "      <td>588268</td>\n",
       "      <td>96766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200317</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2267793</td>\n",
       "      <td>214572</td>\n",
       "      <td>-29599</td>\n",
       "      <td>235253</td>\n",
       "      <td>19824</td>\n",
       "      <td>569533</td>\n",
       "      <td>101262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200318</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2183291</td>\n",
       "      <td>137680</td>\n",
       "      <td>-25907</td>\n",
       "      <td>156161</td>\n",
       "      <td>5006</td>\n",
       "      <td>600540</td>\n",
       "      <td>175800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200319</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2622175</td>\n",
       "      <td>262490</td>\n",
       "      <td>52774</td>\n",
       "      <td>187375</td>\n",
       "      <td>18483</td>\n",
       "      <td>645212</td>\n",
       "      <td>193732</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200320</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2568459</td>\n",
       "      <td>206366</td>\n",
       "      <td>38008</td>\n",
       "      <td>130401</td>\n",
       "      <td>41480</td>\n",
       "      <td>635652</td>\n",
       "      <td>175462</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200323</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1996112</td>\n",
       "      <td>4251</td>\n",
       "      <td>75332</td>\n",
       "      <td>-9270</td>\n",
       "      <td>-66764</td>\n",
       "      <td>556072</td>\n",
       "      <td>189831</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200324</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2740776</td>\n",
       "      <td>101255</td>\n",
       "      <td>-14740</td>\n",
       "      <td>126086</td>\n",
       "      <td>-22304</td>\n",
       "      <td>717309</td>\n",
       "      <td>244387</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200325</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2364524</td>\n",
       "      <td>-1563</td>\n",
       "      <td>-36784</td>\n",
       "      <td>99973</td>\n",
       "      <td>-67958</td>\n",
       "      <td>660158</td>\n",
       "      <td>272273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200326</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1690348</td>\n",
       "      <td>-106656</td>\n",
       "      <td>-144715</td>\n",
       "      <td>99106</td>\n",
       "      <td>-78811</td>\n",
       "      <td>526321</td>\n",
       "      <td>191957</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200327</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1607639</td>\n",
       "      <td>-147108</td>\n",
       "      <td>-217881</td>\n",
       "      <td>69956</td>\n",
       "      <td>-20761</td>\n",
       "      <td>535391</td>\n",
       "      <td>193271</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200330</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1199832</td>\n",
       "      <td>-259374</td>\n",
       "      <td>-185024</td>\n",
       "      <td>-88486</td>\n",
       "      <td>-15678</td>\n",
       "      <td>492159</td>\n",
       "      <td>179934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200331</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>932421</td>\n",
       "      <td>-299673</td>\n",
       "      <td>-185141</td>\n",
       "      <td>-117303</td>\n",
       "      <td>-13511</td>\n",
       "      <td>440755</td>\n",
       "      <td>146614</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200401</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>309687</td>\n",
       "      <td>-513903</td>\n",
       "      <td>-155797</td>\n",
       "      <td>-375921</td>\n",
       "      <td>-16663</td>\n",
       "      <td>448814</td>\n",
       "      <td>189019</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200402</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>546431</td>\n",
       "      <td>-419471</td>\n",
       "      <td>-22748</td>\n",
       "      <td>-393533</td>\n",
       "      <td>-19337</td>\n",
       "      <td>392005</td>\n",
       "      <td>153650</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200403</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>822433</td>\n",
       "      <td>-325012</td>\n",
       "      <td>-9139</td>\n",
       "      <td>-315063</td>\n",
       "      <td>11133</td>\n",
       "      <td>387736</td>\n",
       "      <td>159778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200407</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1984305</td>\n",
       "      <td>-39788</td>\n",
       "      <td>75863</td>\n",
       "      <td>-143704</td>\n",
       "      <td>51940</td>\n",
       "      <td>442933</td>\n",
       "      <td>154962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200408</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2813734</td>\n",
       "      <td>285003</td>\n",
       "      <td>-21269</td>\n",
       "      <td>212914</td>\n",
       "      <td>114325</td>\n",
       "      <td>441642</td>\n",
       "      <td>114863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200409</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2670050</td>\n",
       "      <td>403395</td>\n",
       "      <td>87507</td>\n",
       "      <td>234647</td>\n",
       "      <td>112002</td>\n",
       "      <td>280302</td>\n",
       "      <td>104073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200410</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3503899</td>\n",
       "      <td>733011</td>\n",
       "      <td>257306</td>\n",
       "      <td>344104</td>\n",
       "      <td>161412</td>\n",
       "      <td>247442</td>\n",
       "      <td>70832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200413</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3151101</td>\n",
       "      <td>589161</td>\n",
       "      <td>96889</td>\n",
       "      <td>415958</td>\n",
       "      <td>113596</td>\n",
       "      <td>303037</td>\n",
       "      <td>126292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200414</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2710748</td>\n",
       "      <td>499413</td>\n",
       "      <td>7258</td>\n",
       "      <td>419391</td>\n",
       "      <td>113953</td>\n",
       "      <td>238938</td>\n",
       "      <td>90344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200415</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2376220</td>\n",
       "      <td>370684</td>\n",
       "      <td>27237</td>\n",
       "      <td>255308</td>\n",
       "      <td>144211</td>\n",
       "      <td>250621</td>\n",
       "      <td>105934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200416</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2309153</td>\n",
       "      <td>448219</td>\n",
       "      <td>96551</td>\n",
       "      <td>234006</td>\n",
       "      <td>172387</td>\n",
       "      <td>193092</td>\n",
       "      <td>34808</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200417</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1953567</td>\n",
       "      <td>296570</td>\n",
       "      <td>64629</td>\n",
       "      <td>81018</td>\n",
       "      <td>174873</td>\n",
       "      <td>167966</td>\n",
       "      <td>10944</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200420</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1810302</td>\n",
       "      <td>193720</td>\n",
       "      <td>-12885</td>\n",
       "      <td>64657</td>\n",
       "      <td>172758</td>\n",
       "      <td>205791</td>\n",
       "      <td>9511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200421</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1714688</td>\n",
       "      <td>215054</td>\n",
       "      <td>60696</td>\n",
       "      <td>80598</td>\n",
       "      <td>98560</td>\n",
       "      <td>156777</td>\n",
       "      <td>-47560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200422</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1949009</td>\n",
       "      <td>246564</td>\n",
       "      <td>136814</td>\n",
       "      <td>53895</td>\n",
       "      <td>80504</td>\n",
       "      <td>231318</td>\n",
       "      <td>-24858</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200423</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2261150</td>\n",
       "      <td>304352</td>\n",
       "      <td>283583</td>\n",
       "      <td>-43553</td>\n",
       "      <td>98365</td>\n",
       "      <td>254278</td>\n",
       "      <td>31512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200424</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2364006</td>\n",
       "      <td>371013</td>\n",
       "      <td>247750</td>\n",
       "      <td>50965</td>\n",
       "      <td>88414</td>\n",
       "      <td>255008</td>\n",
       "      <td>2220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200427</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2309809</td>\n",
       "      <td>317666</td>\n",
       "      <td>252010</td>\n",
       "      <td>-4036</td>\n",
       "      <td>131728</td>\n",
       "      <td>227767</td>\n",
       "      <td>13245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200428</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1818277</td>\n",
       "      <td>154319</td>\n",
       "      <td>171294</td>\n",
       "      <td>-119869</td>\n",
       "      <td>123636</td>\n",
       "      <td>204347</td>\n",
       "      <td>25457</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200429</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>1918854</td>\n",
       "      <td>120192</td>\n",
       "      <td>96974</td>\n",
       "      <td>-56951</td>\n",
       "      <td>124857</td>\n",
       "      <td>244689</td>\n",
       "      <td>57606</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200430</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2883589</td>\n",
       "      <td>456494</td>\n",
       "      <td>165150</td>\n",
       "      <td>179765</td>\n",
       "      <td>162481</td>\n",
       "      <td>211158</td>\n",
       "      <td>82167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200506</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>2926557</td>\n",
       "      <td>488702</td>\n",
       "      <td>184165</td>\n",
       "      <td>182282</td>\n",
       "      <td>191082</td>\n",
       "      <td>161228</td>\n",
       "      <td>82769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200507</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3528170</td>\n",
       "      <td>691206</td>\n",
       "      <td>132545</td>\n",
       "      <td>366260</td>\n",
       "      <td>254288</td>\n",
       "      <td>172370</td>\n",
       "      <td>45596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200508</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3427475</td>\n",
       "      <td>612268</td>\n",
       "      <td>107380</td>\n",
       "      <td>290729</td>\n",
       "      <td>281300</td>\n",
       "      <td>237805</td>\n",
       "      <td>61539</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20200511</th>\n",
       "      <th>永安期货</th>\n",
       "      <td>3456647</td>\n",
       "      <td>607290</td>\n",
       "      <td>79564</td>\n",
       "      <td>275214</td>\n",
       "      <td>284252</td>\n",
       "      <td>290673</td>\n",
       "      <td>84098</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "variety           商品板块     工业品    化工板块    黑色板块    有色板块     农产品    油脂板块\n",
       "date     会员简称                                                         \n",
       "20200302 永安期货  2242503  386111  155564    9854  155534  553749  137234\n",
       "20200303 永安期货  2321892  403162  175000   43168  120185  537433  128930\n",
       "20200304 永安期货  3081902  548168  172859  185478  122048  570731  153810\n",
       "20200305 永安期货  3259601  558203  122198  222118  146483  608719  163035\n",
       "20200306 永安期货  2988019  478137  128105  134002  145468  571283  136139\n",
       "20200309 永安期货  2518960  445132  129510  137423   98602  597436  108715\n",
       "20200310 永安期货  2953085  664653  123768  321145  156259  479806  105746\n",
       "20200311 永安期货  3086349  723774  133344  439635  105992  444330   96036\n",
       "20200312 永安期货  2449221  581648   85941  410367   56977  487568   89059\n",
       "20200313 永安期货  2584952  489821   58306  318745   99903  561647  102107\n",
       "20200316 永安期货  2870598  412635   17640  355979   35166  588268   96766\n",
       "20200317 永安期货  2267793  214572  -29599  235253   19824  569533  101262\n",
       "20200318 永安期货  2183291  137680  -25907  156161    5006  600540  175800\n",
       "20200319 永安期货  2622175  262490   52774  187375   18483  645212  193732\n",
       "20200320 永安期货  2568459  206366   38008  130401   41480  635652  175462\n",
       "20200323 永安期货  1996112    4251   75332   -9270  -66764  556072  189831\n",
       "20200324 永安期货  2740776  101255  -14740  126086  -22304  717309  244387\n",
       "20200325 永安期货  2364524   -1563  -36784   99973  -67958  660158  272273\n",
       "20200326 永安期货  1690348 -106656 -144715   99106  -78811  526321  191957\n",
       "20200327 永安期货  1607639 -147108 -217881   69956  -20761  535391  193271\n",
       "20200330 永安期货  1199832 -259374 -185024  -88486  -15678  492159  179934\n",
       "20200331 永安期货   932421 -299673 -185141 -117303  -13511  440755  146614\n",
       "20200401 永安期货   309687 -513903 -155797 -375921  -16663  448814  189019\n",
       "20200402 永安期货   546431 -419471  -22748 -393533  -19337  392005  153650\n",
       "20200403 永安期货   822433 -325012   -9139 -315063   11133  387736  159778\n",
       "20200407 永安期货  1984305  -39788   75863 -143704   51940  442933  154962\n",
       "20200408 永安期货  2813734  285003  -21269  212914  114325  441642  114863\n",
       "20200409 永安期货  2670050  403395   87507  234647  112002  280302  104073\n",
       "20200410 永安期货  3503899  733011  257306  344104  161412  247442   70832\n",
       "20200413 永安期货  3151101  589161   96889  415958  113596  303037  126292\n",
       "20200414 永安期货  2710748  499413    7258  419391  113953  238938   90344\n",
       "20200415 永安期货  2376220  370684   27237  255308  144211  250621  105934\n",
       "20200416 永安期货  2309153  448219   96551  234006  172387  193092   34808\n",
       "20200417 永安期货  1953567  296570   64629   81018  174873  167966   10944\n",
       "20200420 永安期货  1810302  193720  -12885   64657  172758  205791    9511\n",
       "20200421 永安期货  1714688  215054   60696   80598   98560  156777  -47560\n",
       "20200422 永安期货  1949009  246564  136814   53895   80504  231318  -24858\n",
       "20200423 永安期货  2261150  304352  283583  -43553   98365  254278   31512\n",
       "20200424 永安期货  2364006  371013  247750   50965   88414  255008    2220\n",
       "20200427 永安期货  2309809  317666  252010   -4036  131728  227767   13245\n",
       "20200428 永安期货  1818277  154319  171294 -119869  123636  204347   25457\n",
       "20200429 永安期货  1918854  120192   96974  -56951  124857  244689   57606\n",
       "20200430 永安期货  2883589  456494  165150  179765  162481  211158   82167\n",
       "20200506 永安期货  2926557  488702  184165  182282  191082  161228   82769\n",
       "20200507 永安期货  3528170  691206  132545  366260  254288  172370   45596\n",
       "20200508 永安期货  3427475  612268  107380  290729  281300  237805   61539\n",
       "20200511 永安期货  3456647  607290   79564  275214  284252  290673   84098"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "板块=sz.copy()\n",
    "板块=板块[['商品板块','工业品','化工板块','黑色板块','有色板块','农产品','油脂板块']]\n",
    "板块['20200220':]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
